chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[PATCH] let klibc add the trailing newline to syslog conditionally
[elogind.git]
/
klibc
/
klibc
/
strcmp.c
1
/*
2
* strcmp.c
3
*/
4
5
#include <string.h>
6
7
int strcmp(const char *s1, const char *s2)
8
{
9
const unsigned char *c1 = s1, *c2 = s2;
10
unsigned char ch;
11
int d = 0;
12
13
while ( 1 ) {
14
d = (int)(ch = *c1++) - (int)*c2++;
15
if ( d || !ch )
16
break;
17
}
18
19
return d;
20
}