From 8b0142c229ac9f9e01e207f0c25125eebf254ee7 Mon Sep 17 00:00:00 2001 From: Bor Grošelj Simić Date: Tue, 22 Sep 2020 09:03:12 +0200 Subject: [PATCH] string.c: swap calloc arguments --- src/string.c | 2 +- diff --git a/src/string.c b/src/string.c index aaf44d0bd8a29a94deef9dc8b9bed98f8f277c74..0d1f38f53f8e08c0c89306adf3501c8f7c505fd8 100644 --- a/src/string.c +++ b/src/string.c @@ -16,7 +16,7 @@ return 1; } struct str *str_create() { - struct str *str = calloc(sizeof(struct str), 1); + struct str *str = calloc(1, sizeof(struct str)); str->str = malloc(16); str->size = 16; str->len = 0; -- 2.48.1