Use proper argument order for calloc(3).
MFC after: 1 month
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user