[ovs-dev] [PATCH] bfd: Delete trailing whitespace in 'bfd/show' output.
Alex Wang
alexw at nicira.com
Tue Aug 13 17:02:41 UTC 2013
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 <alexw at 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
More information about the dev
mailing list