summaryrefslogtreecommitdiff
path: root/lib/libc/src/strcmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/src/strcmp.c')
-rw-r--r--lib/libc/src/strcmp.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/libc/src/strcmp.c b/lib/libc/src/strcmp.c
index 296d7163..9b00bbc5 100644
--- a/lib/libc/src/strcmp.c
+++ b/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);
}