summaryrefslogtreecommitdiff
path: root/lib/ofp-print.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2017-09-14 17:01:18 -0700
committerBen Pfaff <blp@ovn.org>2017-10-06 20:52:24 -0700
commitf92ef1a8e850762a8f3f79f280804bc6cf4c73e3 (patch)
treefe585121dab7c8199c2d68cdc9128878bebecc72 /lib/ofp-print.c
parent327a39b6ece259fc32cb4ce8fc5e4e0a4cbfd90c (diff)
downloadopenvswitch-f92ef1a8e850762a8f3f79f280804bc6cf4c73e3.tar.gz
ofp-print: Avoid trailing white space in OpenFlow dumps.
ofp_to_string() sometimes yields a trailing space in its output. This is annoying for the test infrastructure, since we have to specially mark the trailing white space in Autotest with a "@&t@" marker at the end of the line. This commit gets rid of the trailing white space and the annoying "@&t@" markers. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org>
Diffstat (limited to 'lib/ofp-print.c')
-rw-r--r--lib/ofp-print.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ofp-print.c b/lib/ofp-print.c
index f77b31baf..151d618b5 100644
--- a/lib/ofp-print.c
+++ b/lib/ofp-print.c
@@ -3791,6 +3791,7 @@ ofp_to_string(const void *oh_, size_t len,
error = ofpraw_decode(&raw, oh);
if (!error) {
ofp_to_string__(oh, port_map, raw, &string, verbosity);
+ ds_chomp(&string, ' ');
if (verbosity >= 5) {
if (ds_last(&string) != '\n') {
ds_put_char(&string, '\n');