Use proper argument order for calloc(3).

MFC after:	1 month
This commit is contained in:
Edward Tomasz Napierala
2016-09-14 11:20:58 +00:00
parent 8393643c27
commit 275253770b
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ pick_option(const char *option, char **optionsp)
tofree = *optionsp;
newoptions = calloc(strlen(*optionsp) + 1, 1);
newoptions = calloc(1, strlen(*optionsp) + 1);
if (newoptions == NULL)
log_err(1, "calloc");
+1 -1
View File
@@ -78,7 +78,7 @@ automounted_add(fsid_t fsid, const char *mountpoint)
{
struct automounted_fs *af;
af = calloc(sizeof(*af), 1);
af = calloc(1, sizeof(*af));
if (af == NULL)
log_err(1, "calloc");
af->af_mount_time = time(NULL);
+1 -1
View File
@@ -225,7 +225,7 @@ defined_add(const char *name, const char *value)
log_debugx("defining variable %s=%s", name, value);
d = calloc(sizeof(*d), 1);
d = calloc(1, sizeof(*d));
if (d == NULL)
log_err(1, "calloc");
d->d_name = checked_strdup(name);