git: c2173903598a - main - route: use NULL for null ptr in getaddr call, not 0

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Sat, 01 Jan 2022 17:05:01 UTC
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=c2173903598a33122a8006a944158b95dd5e2d80

commit c2173903598a33122a8006a944158b95dd5e2d80
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2021-12-31 18:21:13 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
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);