diff options
Diffstat (limited to 'nsprpub/lib/libc/src/strcmp.c')
-rw-r--r-- | nsprpub/lib/libc/src/strcmp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/nsprpub/lib/libc/src/strcmp.c b/nsprpub/lib/libc/src/strcmp.c index 296d71631..9b00bbc52 100644 --- a/nsprpub/lib/libc/src/strcmp.c +++ b/nsprpub/lib/libc/src/strcmp.c @@ -9,10 +9,12 @@ PR_IMPLEMENT(PRIntn) PL_strcmp(const char *a, const char *b) { - if( (const char *)0 == a ) + if( (const char *)0 == a ) { return ((const char *)0 == b) ? 0 : -1; - if( (const char *)0 == b ) + } + if( (const char *)0 == b ) { return 1; + } return (PRIntn)strcmp(a, b); } @@ -20,10 +22,12 @@ PL_strcmp(const char *a, const char *b) PR_IMPLEMENT(PRIntn) PL_strncmp(const char *a, const char *b, PRUint32 max) { - if( (const char *)0 == a ) + if( (const char *)0 == a ) { return ((const char *)0 == b) ? 0 : -1; - if( (const char *)0 == b ) + } + if( (const char *)0 == b ) { return 1; + } return (PRIntn)strncmp(a, b, (size_t)max); } |