From efac25e23b0226cfc37f4992ffef3eeb915f44c9 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Wed, 23 May 2012 21:28:32 +0200 Subject: [PATCH] kernel/linux: Fix a wrong cast (introduced in e54488bb). --- sys/emulation/linux/linux_file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/emulation/linux/linux_file.c b/sys/emulation/linux/linux_file.c index 6544c63859..c3652ec7f1 100644 --- a/sys/emulation/linux/linux_file.c +++ b/sys/emulation/linux/linux_file.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_file.c,v 1.41.2.6 2003/01/06 09:19:43 fjoe Exp $ - * $DragonFly: src/sys/emulation/linux/linux_file.c,v 1.39 2008/09/28 05:08:16 dillon Exp $ */ #include "opt_compat.h" @@ -366,7 +365,7 @@ getdents_common(struct linux_getdents64_args *args, int is64bit) } else { justone = 0; } - if ((size_t)nbytes < 0) + if ((ssize_t)nbytes < 0) nbytes = 0; off = fp->f_offset; -- 2.41.0