Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/compat/gen Add missing cast, fixes i386 build. rel...



details:   https://anonhg.NetBSD.org/src/rev/d64f426a4828
branches:  trunk
changeset: 773594:d64f426a4828
user:      mbalmer <mbalmer%NetBSD.org@localhost>
date:      Wed Feb 08 12:10:17 2012 +0000

description:
Add missing cast, fixes i386 build.  releng ok.

diffstat:

 lib/libc/compat/gen/compat_readdir.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 5d026362488e -r d64f426a4828 lib/libc/compat/gen/compat_readdir.c
--- a/lib/libc/compat/gen/compat_readdir.c      Wed Feb 08 09:32:47 2012 +0000
+++ b/lib/libc/compat/gen/compat_readdir.c      Wed Feb 08 12:10:17 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_readdir.c,v 1.2 2012/02/08 03:24:30 christos Exp $      */
+/*     $NetBSD: compat_readdir.c,v 1.3 2012/02/08 12:10:17 mbalmer Exp $       */
 
 #define __LIBC12_SOURCE__
 #include "namespace.h"
@@ -35,7 +35,7 @@
        d12->d_reclen = (uint16_t)d->d_reclen;
        d12->d_namlen = (uint8_t)MIN(d->d_namlen, sizeof(d->d_name) - 1);
        d12->d_type = (uint8_t)d->d_type;
-       memcpy(d12->d_name, d->d_name, d12->d_namlen);
+       memcpy(d12->d_name, d->d_name, (size_t)d12->d_namlen);
        d12->d_name[d12->d_namlen] = '\0';
        return d12;
 }



Home | Main Index | Thread Index | Old Index