- fix some style(9) nits with my last commit

- add a comment explaining why I used '|' instead of '||'

Submitted by:	danfe@
Approved by:	emaste@
This commit is contained in:
Eitan Adler 2011-11-22 02:50:24 +00:00
parent 6854d64811
commit 623b87d8f4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227812
2 changed files with 5 additions and 3 deletions

View File

@ -49,7 +49,7 @@ strcasecmp_l(const char *s1, const char *s2, locale_t locale)
*us1 = (const u_char *)s1,
*us2 = (const u_char *)s2;
if (s1 == s2)
return (0);
return (0);
FIX_LOCALE(locale);
@ -73,8 +73,9 @@ strncasecmp_l(const char *s1, const char *s2, size_t n, locale_t locale)
*us1 = (const u_char *)s1,
*us2 = (const u_char *)s2;
if (( s1 == s2) | (n == 0))
return (0);
/* use a bitwise or to avoid an additional branch instruction */
if ((s1 == s2) | (n == 0))
return (0);
do {

View File

@ -39,6 +39,7 @@ int
strncmp(const char *s1, const char *s2, size_t n)
{
/* use a bitwise or to avoid an additional branch instruction */
if ((n == 0) | (s1 == s2))
return (0);