We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f8e837 commit 8a5a4b0Copy full SHA for 8a5a4b0
libopenarc/arc-util.c
@@ -430,12 +430,15 @@ arc_dstring_blank(struct arc_dstring *dstr)
430
** Return value:
431
** a copy of s1.
432
*/
433
+
434
char *
435
arc_strdup(const char *s1)
436
{
- char *s = ARC_MALLOC(strlen(s1)+1);
437
- if (s)
438
- memcpy(s, s1, strlen(s1)+1);
+ char *s;
439
+ s = ARC_MALLOC(strlen(s1) + 1);
440
+ if (s != NULL)
441
+ memcpy(s, s1, strlen(s1) + 1);
442
return s;
443
}
444
0 commit comments