From owner-svn-src-all@freebsd.org Mon Aug 22 15:01:41 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 02770BC2B79; Mon, 22 Aug 2016 15:01:41 +0000 (UTC) (envelope-from araujo@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 D46601394; Mon, 22 Aug 2016 15:01:40 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7MF1e9a077098; Mon, 22 Aug 2016 15:01:40 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7MF1ddO077092; Mon, 22 Aug 2016 15:01:39 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201608221501.u7MF1ddO077092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 22 Aug 2016 15:01:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304605 - in head/usr.sbin: ctld iscsid 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.22 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: Mon, 22 Aug 2016 15:01:41 -0000 Author: araujo Date: Mon Aug 22 15:01:39 2016 New Revision: 304605 URL: https://svnweb.freebsd.org/changeset/base/304605 Log: Fix calloc(3) argument order. Reviewed by: trasz MFC after: 4 weeks. Differential Revision: https://reviews.freebsd.org/D7532 Modified: head/usr.sbin/ctld/chap.c head/usr.sbin/ctld/keys.c head/usr.sbin/ctld/pdu.c head/usr.sbin/iscsid/chap.c head/usr.sbin/iscsid/keys.c head/usr.sbin/iscsid/pdu.c Modified: head/usr.sbin/ctld/chap.c ============================================================================== --- head/usr.sbin/ctld/chap.c Mon Aug 22 14:53:39 2016 (r304604) +++ head/usr.sbin/ctld/chap.c Mon Aug 22 15:01:39 2016 (r304605) @@ -232,7 +232,7 @@ chap_new(void) { struct chap *chap; - chap = calloc(sizeof(*chap), 1); + chap = calloc(1, sizeof(*chap)); if (chap == NULL) log_err(1, "calloc"); @@ -333,7 +333,7 @@ rchap_new(const char *secret) { struct rchap *rchap; - rchap = calloc(sizeof(*rchap), 1); + rchap = calloc(1, sizeof(*rchap)); if (rchap == NULL) log_err(1, "calloc"); Modified: head/usr.sbin/ctld/keys.c ============================================================================== --- head/usr.sbin/ctld/keys.c Mon Aug 22 14:53:39 2016 (r304604) +++ head/usr.sbin/ctld/keys.c Mon Aug 22 15:01:39 2016 (r304605) @@ -43,7 +43,7 @@ keys_new(void) { struct keys *keys; - keys = calloc(sizeof(*keys), 1); + keys = calloc(1, sizeof(*keys)); if (keys == NULL) log_err(1, "calloc"); Modified: head/usr.sbin/ctld/pdu.c ============================================================================== --- head/usr.sbin/ctld/pdu.c Mon Aug 22 14:53:39 2016 (r304604) +++ head/usr.sbin/ctld/pdu.c Mon Aug 22 15:01:39 2016 (r304605) @@ -81,11 +81,11 @@ pdu_new(struct connection *conn) { struct pdu *pdu; - pdu = calloc(sizeof(*pdu), 1); + pdu = calloc(1, sizeof(*pdu)); if (pdu == NULL) log_err(1, "calloc"); - pdu->pdu_bhs = calloc(sizeof(*pdu->pdu_bhs), 1); + pdu->pdu_bhs = calloc(1, sizeof(*pdu->pdu_bhs)); if (pdu->pdu_bhs == NULL) log_err(1, "calloc"); Modified: head/usr.sbin/iscsid/chap.c ============================================================================== --- head/usr.sbin/iscsid/chap.c Mon Aug 22 14:53:39 2016 (r304604) +++ head/usr.sbin/iscsid/chap.c Mon Aug 22 15:01:39 2016 (r304605) @@ -232,7 +232,7 @@ chap_new(void) { struct chap *chap; - chap = calloc(sizeof(*chap), 1); + chap = calloc(1, sizeof(*chap)); if (chap == NULL) log_err(1, "calloc"); @@ -333,7 +333,7 @@ rchap_new(const char *secret) { struct rchap *rchap; - rchap = calloc(sizeof(*rchap), 1); + rchap = calloc(1, sizeof(*rchap)); if (rchap == NULL) log_err(1, "calloc"); Modified: head/usr.sbin/iscsid/keys.c ============================================================================== --- head/usr.sbin/iscsid/keys.c Mon Aug 22 14:53:39 2016 (r304604) +++ head/usr.sbin/iscsid/keys.c Mon Aug 22 15:01:39 2016 (r304605) @@ -43,7 +43,7 @@ keys_new(void) { struct keys *keys; - keys = calloc(sizeof(*keys), 1); + keys = calloc(1, sizeof(*keys)); if (keys == NULL) log_err(1, "calloc"); Modified: head/usr.sbin/iscsid/pdu.c ============================================================================== --- head/usr.sbin/iscsid/pdu.c Mon Aug 22 14:53:39 2016 (r304604) +++ head/usr.sbin/iscsid/pdu.c Mon Aug 22 15:01:39 2016 (r304605) @@ -81,11 +81,11 @@ pdu_new(struct connection *conn) { struct pdu *pdu; - pdu = calloc(sizeof(*pdu), 1); + pdu = calloc(1, sizeof(*pdu)); if (pdu == NULL) log_err(1, "calloc"); - pdu->pdu_bhs = calloc(sizeof(*pdu->pdu_bhs), 1); + pdu->pdu_bhs = calloc(1, sizeof(*pdu->pdu_bhs)); if (pdu->pdu_bhs == NULL) log_err(1, "calloc");