diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-10-17 08:41:25 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-10-17 08:41:25 +0000 |
commit | 29c8997ef3498ff3526bd771d7dc425e6636c600 (patch) | |
tree | bec22eea66abae9e851b59067eaef88b0ebc8854 /sbin | |
parent | 927ff692fc0d599b7da08d28ef56d82d562fb67b (diff) |
Do not print an extra line if the 'get' command succeeds.
Fix a regression introduced in previous.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/route/route.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index 8b595d291d4..f5a7ac3adaa 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.204 2017/10/16 13:28:33 mpi Exp $ */ +/* $OpenBSD: route.c,v 1.205 2017/10/17 08:41:24 mpi Exp $ */ /* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */ /* @@ -675,12 +675,12 @@ newroute(int argc, char **argv) break; } oerrno = errno; - if (!qflag) { + if (!qflag && (*cmd != 'g' || ret != 0)) { printf("%s %s %s", cmd, ishost ? "host" : "net", dest); if (*gateway) { printf(": gateway %s", gateway); if (attempts > 1 && ret == 0 && af == AF_INET) - printf(" (%s)", inet_ntoa(so_gate.sin.sin_addr)); + printf(" (is)", inet_ntoa(so_gate.sin.sin_addr)); } if (ret == 0) printf("\n"); |