Date: Mon, 13 Mar 2017 20:51:00 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315215 - head/usr.sbin/ypbind Message-ID: <201703132051.v2DKp0lf043061@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Mon Mar 13 20:51:00 2017 New Revision: 315215 URL: https://svnweb.freebsd.org/changeset/base/315215 Log: ypbind(8): let calloc(3) do the multiplying. Modified: head/usr.sbin/ypbind/yp_ping.c Modified: head/usr.sbin/ypbind/yp_ping.c ============================================================================== --- head/usr.sbin/ypbind/yp_ping.c Mon Mar 13 20:49:31 2017 (r315214) +++ head/usr.sbin/ypbind/yp_ping.c Mon Mar 13 20:51:00 2017 (r315215) @@ -226,7 +226,7 @@ __yp_ping(struct in_addr *restricted_add int validsrvs = 0; /* Set up handles. */ - reqs = calloc(1, sizeof(struct ping_req *) * cnt); + reqs = calloc(cnt, sizeof(struct ping_req *)); xid_seed = time(NULL) ^ getpid(); for (i = 0; i < cnt; i++) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703132051.v2DKp0lf043061>