Change argument order for calloc()

This commit is contained in:
ValdikSS 2022-02-18 11:05:44 +07:00
parent 8deacbc438
commit 8383ecaadf

View File

@ -30,7 +30,7 @@ int service_register(int argc, char *argv[])
*/
if (!service_argc && !service_argv) {
service_argc = argc;
service_argv = calloc(sizeof(void*), (size_t)(argc + 1));
service_argv = calloc((size_t)(argc + 1), sizeof(void*));
for (i = 0; i < argc; i++) {
service_argv[i] = strdup(argv[i]);
}