aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2016-09-14 11:20:58 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2016-09-14 11:20:58 +0000
commit275253770b5fa20590ddb84babe7ba48b2844712 (patch)
treebb3a8a379d797fc3a6ac305b2a5d883e3b6b60a6
parent8393643c270904980d614afede84c9278a3e296e (diff)
downloadsrc-275253770b5fa20590ddb84babe7ba48b2844712.tar.gz
src-275253770b5fa20590ddb84babe7ba48b2844712.zip
Use proper argument order for calloc(3).
MFC after: 1 month
Notes
Notes: svn path=/head/; revision=305805
-rw-r--r--usr.sbin/autofs/automountd.c2
-rw-r--r--usr.sbin/autofs/autounmountd.c2
-rw-r--r--usr.sbin/autofs/defined.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/autofs/automountd.c b/usr.sbin/autofs/automountd.c
index 44eda6922dd1..2983eead99e3 100644
--- a/usr.sbin/autofs/automountd.c
+++ b/usr.sbin/autofs/automountd.c
@@ -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");
diff --git a/usr.sbin/autofs/autounmountd.c b/usr.sbin/autofs/autounmountd.c
index e64736b1884b..3a13225aa80a 100644
--- a/usr.sbin/autofs/autounmountd.c
+++ b/usr.sbin/autofs/autounmountd.c
@@ -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);
diff --git a/usr.sbin/autofs/defined.c b/usr.sbin/autofs/defined.c
index f94b92d0de97..9bb285f3c29f 100644
--- a/usr.sbin/autofs/defined.c
+++ b/usr.sbin/autofs/defined.c
@@ -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);