summaryrefslogtreecommitdiffstats
path: root/nsprpub/lib/libc/src/strcat.c
diff options
context:
space:
mode:
Diffstat (limited to 'nsprpub/lib/libc/src/strcat.c')
-rw-r--r--nsprpub/lib/libc/src/strcat.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/nsprpub/lib/libc/src/strcat.c b/nsprpub/lib/libc/src/strcat.c
index 05b7b46d9..df847d36a 100644
--- a/nsprpub/lib/libc/src/strcat.c
+++ b/nsprpub/lib/libc/src/strcat.c
@@ -9,8 +9,9 @@
PR_IMPLEMENT(char *)
PL_strcat(char *dest, const char *src)
{
- if( ((char *)0 == dest) || ((const char *)0 == src) )
+ if( ((char *)0 == dest) || ((const char *)0 == src) ) {
return dest;
+ }
return strcat(dest, src);
}
@@ -20,8 +21,9 @@ PL_strncat(char *dest, const char *src, PRUint32 max)
{
char *rv;
- if( ((char *)0 == dest) || ((const char *)0 == src) || (0 == max) )
+ if( ((char *)0 == dest) || ((const char *)0 == src) || (0 == max) ) {
return dest;
+ }
for( rv = dest; *dest; dest++ )
;
@@ -36,13 +38,16 @@ PL_strcatn(char *dest, PRUint32 max, const char *src)
char *rv;
PRUint32 dl;
- if( ((char *)0 == dest) || ((const char *)0 == src) )
+ if( ((char *)0 == dest) || ((const char *)0 == src) ) {
return dest;
+ }
for( rv = dest, dl = 0; *dest; dest++, dl++ )
;
- if( max <= dl ) return rv;
+ if( max <= dl ) {
+ return rv;
+ }
(void)PL_strncpyz(dest, src, max-dl);
return rv;