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:
@@ -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, ',');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user