From nobody Sat Jan 01 17:05:01 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F3A341939B92; Sat, 1 Jan 2022 17:05:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JR7fj5Ddvz3qmh; Sat, 1 Jan 2022 17:05:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F8A722457; Sat, 1 Jan 2022 17:05:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 201H51eZ075400; Sat, 1 Jan 2022 17:05:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 201H51NT075399; Sat, 1 Jan 2022 17:05:01 GMT (envelope-from git) Date: Sat, 1 Jan 2022 17:05:01 GMT Message-Id: <202201011705.201H51NT075399@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: c2173903598a - main - route: use NULL for null ptr in getaddr call, not 0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2173903598a33122a8006a944158b95dd5e2d80 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641056701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WVY/CF0gRB01XV6UAxFnxqMujAsj4rG6XK3owSnojfw=; b=sCoGIGntgphhjE/3yk2BtHBEpEMKLcqIw2XVmXZ+aY/Q377HTZnasOXH16kwLddTd2VDrC UUfLhx9cOP0Hb4ashY/ky6nQuH8hdSnHYkQbwibmI0SEIvFD09Gsc9GUHdNQ025LtNUlTX VYnu+yLummhQfjTjA+zPuV7BlA0tM2PvJIFIg95uIVYwfDemvj6Hr2YLXT+YYtq5XzX8EH vJulGA++Jt4wqVqFg2twny9ory7xqICL/mXJjdKiziqDF/6YwIYmA+3ldRRBFgw/IAsbNm +d2TemItZqmOdsd8ENohHigyrePHD+qxWNhkosAMTLKJIkpqQ18RkZcx/ZTZMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641056701; a=rsa-sha256; cv=none; b=X2SG1/ChXqGWe1hzXof1W20q0HKDPA8As7S0QQR6jwoJHM6GYXt6JHEhM0CqLh3WdnTgkD 1AH8x/VMX6QKVTaB9N2reTTFoL4R44EoEWNO5k2cGouGxg+u1vUkFC1TXDk2f+D8XIFnWd z5iwr3TjupDMamx4hM7ALY3VQnEuBQBYBI0gYakPWRmNVj+sornBKnaPMg+XoToLy04j50 I1CkaJtMT9SbcCuWKRP04EnGRVm1/DZi3YvYxutkDZ+xRHoE3zIqvGISCgeXXqFbVkH13G Vk1HPFaTCZdgCpVIU9dm9pKaPS+JC11vHNrkrihzuJ8YTHijkD3lc444KsYI7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c2173903598a33122a8006a944158b95dd5e2d80 commit c2173903598a33122a8006a944158b95dd5e2d80 Author: Ed Maste AuthorDate: 2021-12-31 18:21:13 +0000 Commit: Ed Maste CommitDate: 2022-01-01 17:02:17 +0000 route: use NULL for null ptr in getaddr call, not 0 Style(9) prefers NULL. Sponsored by: The FreeBSD Foundation --- sbin/route/route.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sbin/route/route.c b/sbin/route/route.c index b16fb6d17a08..ccd0ca84f055 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -893,22 +893,22 @@ newroute(int argc, char **argv) case K_IFA: if (!--argc) usage(NULL); - getaddr(RTAX_IFA, *++argv, 0, nrflags); + getaddr(RTAX_IFA, *++argv, NULL, nrflags); break; case K_IFP: if (!--argc) usage(NULL); - getaddr(RTAX_IFP, *++argv, 0, nrflags); + getaddr(RTAX_IFP, *++argv, NULL, nrflags); break; case K_GENMASK: if (!--argc) usage(NULL); - getaddr(RTAX_GENMASK, *++argv, 0, nrflags); + getaddr(RTAX_GENMASK, *++argv, NULL, nrflags); break; case K_GATEWAY: if (!--argc) usage(NULL); - getaddr(RTAX_GATEWAY, *++argv, 0, nrflags); + getaddr(RTAX_GATEWAY, *++argv, NULL, nrflags); gateway = *argv; break; case K_DST: @@ -921,7 +921,7 @@ newroute(int argc, char **argv) case K_NETMASK: if (!--argc) usage(NULL); - getaddr(RTAX_NETMASK, *++argv, 0, nrflags); + getaddr(RTAX_NETMASK, *++argv, NULL, nrflags); /* FALLTHROUGH */ case K_NET: nrflags |= F_FORCENET; @@ -962,7 +962,7 @@ newroute(int argc, char **argv) gateway = *argv; getaddr(RTAX_GATEWAY, *argv, &hp, nrflags); } else { - getaddr(RTAX_NETMASK, *argv, 0, nrflags); + getaddr(RTAX_NETMASK, *argv, NULL, nrflags); nrflags |= F_FORCENET; } } @@ -1233,7 +1233,7 @@ getaddr(int idx, char *str, struct hostent **hpp, int nrflags) switch (idx) { case RTAX_DST: nrflags |= F_FORCENET; - getaddr(RTAX_NETMASK, str, 0, nrflags); + getaddr(RTAX_NETMASK, str, NULL, nrflags); break; } return (0);