Slightly simplify match_format() by using ds_chomp() rather than open-coding its logic.
Signed-off-by: Simon Horman <simon.hor...@netronome.com> --- lib/match.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/match.c b/lib/match.c index cbfd735..bd3b13d 100644 --- a/lib/match.c +++ b/lib/match.c @@ -1114,8 +1114,8 @@ match_format(const struct match *match, struct ds *s, int priority) } } - if (s->length > start_len && ds_last(s) == ',') { - s->length--; + if (s->length > start_len) { + ds_chomp(s, ','); } } -- 2.1.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev