2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-29 15:28:56 +00:00

match: Use ds_chomp() in match_format()

Slightly simplify match_format() by using ds_chomp()
rather than open-coding its logic.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Simon Horman
2014-11-04 15:13:45 +09:00
committed by Ben Pfaff
parent c61f3870c2
commit 41f562be0e

View File

@@ -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, ',');
}
}