svn commit: r305805 - head/usr.sbin/autofs
Edward Tomasz Napierala
trasz at FreeBSD.org
Wed Sep 14 11:21:00 UTC 2016
Author: trasz
Date: Wed Sep 14 11:20:58 2016
New Revision: 305805
URL: https://svnweb.freebsd.org/changeset/base/305805
Log:
Use proper argument order for calloc(3).
MFC after: 1 month
Modified:
head/usr.sbin/autofs/automountd.c
head/usr.sbin/autofs/autounmountd.c
head/usr.sbin/autofs/defined.c
Modified: head/usr.sbin/autofs/automountd.c
==============================================================================
--- head/usr.sbin/autofs/automountd.c Wed Sep 14 11:16:00 2016 (r305804)
+++ head/usr.sbin/autofs/automountd.c Wed Sep 14 11:20:58 2016 (r305805)
@@ -97,7 +97,7 @@ pick_option(const char *option, char **o
tofree = *optionsp;
- newoptions = calloc(strlen(*optionsp) + 1, 1);
+ newoptions = calloc(1, strlen(*optionsp) + 1);
if (newoptions == NULL)
log_err(1, "calloc");
Modified: head/usr.sbin/autofs/autounmountd.c
==============================================================================
--- head/usr.sbin/autofs/autounmountd.c Wed Sep 14 11:16:00 2016 (r305804)
+++ head/usr.sbin/autofs/autounmountd.c Wed Sep 14 11:20:58 2016 (r305805)
@@ -78,7 +78,7 @@ automounted_add(fsid_t fsid, const char
{
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);
Modified: head/usr.sbin/autofs/defined.c
==============================================================================
--- head/usr.sbin/autofs/defined.c Wed Sep 14 11:16:00 2016 (r305804)
+++ head/usr.sbin/autofs/defined.c Wed Sep 14 11:20:58 2016 (r305805)
@@ -225,7 +225,7 @@ defined_add(const char *name, const char
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);
More information about the svn-src-all
mailing list