From: Alex Wang Date: Tue, 13 Aug 2013 17:02:41 +0000 (-0700) Subject: bfd: Delete trailing whitespace in 'bfd/show' output. X-Git-Tag: sliver-openvswitch-2.0.90-1~27^2~17 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=70e575d980df7b272c51853204bf403551f8b200;p=sliver-openvswitch.git bfd: Delete trailing whitespace in 'bfd/show' output. This commit chops off the trailing whitespace in the 'flag' field of 'bfd/show' output. This is for the string matching in bfd unit test. Signed-off-by: Alex Wang Signed-off-by: Ben Pfaff --- diff --git a/lib/bfd.c b/lib/bfd.c index 81fd17877..7c7c0b740 100644 --- a/lib/bfd.c +++ b/lib/bfd.c @@ -782,6 +782,8 @@ bfd_flag_str(enum flags flags) ds_put_cstr(&ds, "poll "); } + /* Do not copy the trailing whitespace. */ + ds_chomp(&ds, ' '); ovs_strlcpy(flag_str, ds_cstr(&ds), sizeof flag_str); ds_destroy(&ds); return flag_str;