Browse Source

reformatting: cJSON_strdup

pull/29/head
Max Bruckner 8 years ago
parent
commit
18081c03c4
  1. 6
      cJSON.c

6
cJSON.c

@ -70,8 +70,12 @@ static char* cJSON_strdup(const char* str)
char* copy;
len = strlen(str) + 1;
if (!(copy = (char*)cJSON_malloc(len))) return 0;
if (!(copy = (char*)cJSON_malloc(len)))
{
return 0;
}
memcpy(copy, str, len);
return copy;
}

Loading…
Cancel
Save