From 268f1a9c925d44e5e3e2a0c4f804d4108e1dab90 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Fri, 7 Feb 2020 00:53:24 -0500 Subject: Reorganize calloc arguments --- src/strings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/strings.c') 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; -- cgit