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 <al...@nicira.com>
---
 lib/bfd.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/bfd.c b/lib/bfd.c
index 81fd178..7c7c0b7 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;
-- 
1.7.9.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to