git: d2c9a140547a - main - ping: Remove an extra new line character
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 11 Oct 2023 18:01:04 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=d2c9a140547acf1bfe3a233ef15cf971be93e14d
commit d2c9a140547acf1bfe3a233ef15cf971be93e14d
Author: Jose Luis Duran <jlduran@gmail.com>
AuthorDate: 2023-02-09 18:16:39 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-10-11 17:48:27 +0000
ping: Remove an extra new line character
This matches the behavior when an RR truncated route is printed.
Reviewed by: markj
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/863
Differential Revision: https://reviews.freebsd.org/D39485
---
sbin/ping/ping.c | 2 +-
sbin/ping/tests/test_ping.py | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index f67d85f30a5d..848ffbbb7c76 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -1406,7 +1406,7 @@ pr_pack(char *buf, ssize_t cc, struct sockaddr_in *from, struct timespec *tv)
(void)putchar('\n');
}
} else
- (void)printf("\t(truncated route)\n");
+ (void)printf("\t(truncated route)");
break;
case IPOPT_RR:
j = cp[IPOPT_OLEN]; /* get length */
diff --git a/sbin/ping/tests/test_ping.py b/sbin/ping/tests/test_ping.py
index c311a77d6bb8..1c2540cb6d15 100644
--- a/sbin/ping/tests/test_ping.py
+++ b/sbin/ping/tests/test_ping.py
@@ -859,7 +859,6 @@ PING 192.0.2.2 (192.0.2.2): 56 data bytes
64 bytes from: icmp_seq=0 ttl= time= ms
LSRR: (truncated route)
-
--- 192.0.2.2 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = /// ms
@@ -916,7 +915,6 @@ PING 192.0.2.2 (192.0.2.2): 56 data bytes
64 bytes from: icmp_seq=0 ttl= time= ms
SSRR: (truncated route)
-
--- 192.0.2.2 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = /// ms