Date: Thu, 4 Dec 2014 23:21:42 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r275489 - stable/10/sys/libkern Message-ID: <201412042321.sB4NLgpG005399@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Thu Dec 4 23:21:42 2014 New Revision: 275489 URL: https://svnweb.freebsd.org/changeset/base/275489 Log: MFC r274636: Sync with userland variant. Modified: stable/10/sys/libkern/strncmp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/libkern/strncmp.c ============================================================================== --- stable/10/sys/libkern/strncmp.c Thu Dec 4 23:20:44 2014 (r275488) +++ stable/10/sys/libkern/strncmp.c Thu Dec 4 23:21:42 2014 (r275489) @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -33,9 +33,7 @@ __FBSDID("$FreeBSD$"); #include <sys/libkern.h> int -strncmp(s1, s2, n) - register const char *s1, *s2; - register size_t n; +strncmp(const char *s1, const char *s2, size_t n) { if (n == 0) @@ -44,7 +42,7 @@ strncmp(s1, s2, n) if (*s1 != *s2++) return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1)); - if (*s1++ == 0) + if (*s1++ == '\0') break; } while (--n != 0); return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412042321.sB4NLgpG005399>