diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-07 00:53:24 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-07 00:53:24 -0500 |
commit | 268f1a9c925d44e5e3e2a0c4f804d4108e1dab90 (patch) | |
tree | a978b63c5b857032dda7def9041f149af8348833 /src/strings.c | |
parent | ba55487612416b71f22520c87dba477405535a08 (diff) | |
download | spmc-268f1a9c925d44e5e3e2a0c4f804d4108e1dab90.tar.gz |
Reorganize calloc arguments
Diffstat (limited to 'src/strings.c')
-rw-r--r-- | src/strings.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/strings.c b/src/strings.c index f86acb2..afd5be3 100644 --- a/src/strings.c +++ b/src/strings.c @@ -175,7 +175,7 @@ char** split(char *_sptr, const char* delim) int i = 0; char *token = NULL; while((token = strsep(&sptr, delim)) != NULL) { - result[i] = (char *)calloc(1, sizeof(char) * strlen(token) + 1); + result[i] = (char *)calloc(strlen(token) + 1, sizeof(char)); if (!result[i]) { free(sptr); return NULL; |