From 70e575d980df7b272c51853204bf403551f8b200 Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Tue, 13 Aug 2013 10:02:41 -0700 Subject: [PATCH] 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 --- lib/bfd.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.47.0