From d3408809e4c57e6d4e5f49cc35286bcd7761ccd6 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 5 Mar 2017 11:50:34 -0600 Subject: [PATCH] =?UTF-8?q?sendfile():=20=20Fix=20error=20introduced=20wit?= =?UTF-8?q?h=20commit=20ff73be870e38959b0aaee5961dc47b4b58dc2d86.=20=20Not?= =?UTF-8?q?ed=20by=20Maciej=20W=C3=B3jcik?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arch/arm/src/stm32/chip/stm32f33xxx_hrtim.h | 2 +- fs/vfs/fs_sendfile.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/src/stm32/chip/stm32f33xxx_hrtim.h b/arch/arm/src/stm32/chip/stm32f33xxx_hrtim.h index b00f95f25c..fc22deeb25 100644 --- a/arch/arm/src/stm32/chip/stm32f33xxx_hrtim.h +++ b/arch/arm/src/stm32/chip/stm32f33xxx_hrtim.h @@ -2060,4 +2060,4 @@ #define HRTIM_BDMADR_SHIFT 0 /* Bits 0-31: Burst DMA Data register */ #define HRTIM_BDMADR_MASK (0xffffffff << HRTIM_BDMADR_SHIFT) -#endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32_HRTIM_H */ +#endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32_HRTIM_H */ diff --git a/fs/vfs/fs_sendfile.c b/fs/vfs/fs_sendfile.c index c1a4703601..c91435e11f 100644 --- a/fs/vfs/fs_sendfile.c +++ b/fs/vfs/fs_sendfile.c @@ -1,7 +1,7 @@ /**************************************************************************** * fs/vfs/fs_sendfile.c * - * Copyright (C) 2007, 2009, 2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011, 2013, 2017 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -103,7 +103,6 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) { #if defined(CONFIG_NET_TCP) && CONFIG_NSOCKET_DESCRIPTORS > 0 - /* Check the destination file descriptor: Is it a (probable) file * descriptor? Check the source file: Is it a normal file? */ @@ -117,7 +116,7 @@ ssize_t sendfile(int outfd, int infd, off_t *offset, size_t count) * structure. */ - filep = fs_getfilep(fd); + filep = fs_getfilep(infd); if (!filep) { /* The errno value has already been set */