From owner-svn-src-all@freebsd.org Wed Sep 14 11:21:00 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C409AC454D; Wed, 14 Sep 2016 11:21:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D5EE1125; Wed, 14 Sep 2016 11:21:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8EBKxb0083888; Wed, 14 Sep 2016 11:20:59 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8EBKx1A083885; Wed, 14 Sep 2016 11:20:59 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201609141120.u8EBKx1A083885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 14 Sep 2016 11:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305805 - head/usr.sbin/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Sep 2016 11:21:00 -0000 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);