Commit Diff
Diff:
6238196dac6cab9dae0b4d01190a7fad307d5a93
51396f8f1c10506b558ce98aafb80aff4b2a95bd
Commit:
51396f8f1c10506b558ce98aafb80aff4b2a95bd
Tree:
c61b0fdc7c208a35f6131f450a605e6a71e20c2b
Author:
Alexander Barton <alex@barton.de>
Committer:
Alexander Barton <alex@barton.de>
Date:
Sun Mar 16 21:59:03 2014 UTC
Message:
strdup.c: Code cleanup
blob - 7c0ee8fd26d34b5746267f0da0f7d73cd9216101
blob + 795af7262ab61bbedbb09f797a5d72947427537a
--- src/portab/strdup.c
+++ src/portab/strdup.c
@@ -19,18 +19,19 @@
#include "exp.h"
GLOBAL char *
-strdup( const char *s )
+strdup(const char *s)
{
- char *dup;
- size_t len = strlen( s );
- size_t alloc = len + 1;
+ char *dup;
+ size_t len = strlen(s);
+ size_t alloc = len + 1;
- if (len >= alloc ) return NULL;
- dup = malloc( alloc );
- if (dup) strlcpy(dup, s, alloc );
+ if (len >= alloc)
+ return NULL;
+ dup = malloc(alloc);
+ if (dup)
+ strlcpy(dup, s, alloc );
-return dup;
+ return dup;
}
#endif
-
IRCNow