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); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"