Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Sep 2008 21:47:56 +0300
From:      Gleb Kurtsou <gleb.kurtsou@gmail.com>
To:        "David E. O'Brien" <obrien@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/conf files src/sys/fs/tmpfs tmpfs.h tmpfs_subr.c tmpfs_vnops.c src/sys/i386/i386 bios.c src/sys/ia64/ia64 efi.c sal.c src/sys/libkern memcmp.c src/sys/mips/mips support.S src/sys/sys libkern.h
Message-ID:  <20080923184756.GB1830@rybacik>
In-Reply-To: <200809231446.m8NEkQev007507@repoman.freebsd.org>
References:  <200809231446.m8NEkQev007507@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On (23/09/2008 14:45), David E. O'Brien wrote:
> obrien      2008-09-23 14:45:10 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/conf             files 
>     sys/fs/tmpfs         tmpfs.h tmpfs_subr.c tmpfs_vnops.c 
>     sys/i386/i386        bios.c 
>     sys/ia64/ia64        efi.c sal.c 
>     sys/mips/mips        support.S 
>     sys/sys              libkern.h 
>   Added files:
>     sys/libkern          memcmp.c 
>   Log:
>   SVN rev 183299 on 2008-09-23 14:45:10Z by obrien
>   
>   The kernel implemented 'memcmp' is an alias for 'bcmp'.  However, memcmp
>   and bcmp are not the same thing.  'man bcmp' states that the return is
>   "non-zero" if the two byte strings are not identical.  Where as,
>   'man memcmp' states that the return is the "difference between the
>   first two differing bytes (treated as unsigned char values" if the
>   two byte strings are not identical.
Thanks for fixing it. For a note, the same bug was fixed in if_bridge
several years ago.

>   So provide a proper memcmp(9), but it is a C implementation not a tuned
>   assembly implementation.  Therefore bcmp(9) should be preferred over memcmp(9).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080923184756.GB1830>