svn commit: r340686 - head/sbin/dumpon

Mark Johnston markj at FreeBSD.org
Tue Nov 20 18:10:57 UTC 2018


Author: markj
Date: Tue Nov 20 18:10:56 2018
New Revision: 340686
URL: https://svnweb.freebsd.org/changeset/base/340686

Log:
  Avoid clobbering a user-specified -g value after r340547.
  
  CID:		1396919
  MFC with:	r340547

Modified:
  head/sbin/dumpon/dumpon.c

Modified: head/sbin/dumpon/dumpon.c
==============================================================================
--- head/sbin/dumpon/dumpon.c	Tue Nov 20 17:43:24 2018	(r340685)
+++ head/sbin/dumpon/dumpon.c	Tue Nov 20 18:10:56 2018	(r340686)
@@ -475,12 +475,15 @@ main(int argc, char *argv[])
 		if (inet_aton(client, &ndconf.ndc_client) == 0)
 			errx(EX_USAGE, "invalid client address '%s'", client);
 
-		gateway = find_gateway(argv[0]);
 		if (gateway == NULL) {
-			if (verbose)
-				printf("failed to look up gateway for %s\n",
-				    server);
-			gateway = server;
+			gateway = find_gateway(argv[0]);
+			if (gateway == NULL) {
+				if (verbose)
+					printf(
+				    "failed to look up gateway for %s\n",
+					    server);
+				gateway = server;
+			}
 		}
 		if (inet_aton(gateway, &ndconf.ndc_gateway) == 0)
 			errx(EX_USAGE, "invalid gateway address '%s'", gateway);


More information about the svn-src-all mailing list