diff options
author | Ben Pfaff <blp@nicira.com> | 2013-05-15 22:36:04 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-05-16 11:23:09 -0700 |
commit | aaa4b65b23707ca772c3d571353a65bf3838df9a (patch) | |
tree | 40f0e70974061a72fd092eafc9abc78daf2982e7 /lib/dynamic-string.c | |
parent | 9aba74cef5aeadd6cec8addaf6a57bd6dfe4fd02 (diff) | |
download | openvswitch-aaa4b65b23707ca772c3d571353a65bf3838df9a.tar.gz |
Do not include trailing whitespace in hexdump.
Reported-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Tested-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'lib/dynamic-string.c')
-rw-r--r-- | lib/dynamic-string.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/dynamic-string.c b/lib/dynamic-string.c index b35fd0b67..3cccb5c7f 100644 --- a/lib/dynamic-string.c +++ b/lib/dynamic-string.c @@ -394,6 +394,8 @@ ds_put_hex_dump(struct ds *ds, const void *buf_, size_t size, for (; i < per_line; i++) ds_put_format(ds, " "); ds_put_format(ds, "|"); + } else { + ds_chomp(ds, ' '); } ds_put_format(ds, "\n"); |