projects
/
cascardo
/
ovs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c61f387
)
match: Use ds_chomp() in match_format()
author
Simon Horman
<simon.horman@netronome.com>
Tue, 4 Nov 2014 06:13:45 +0000
(15:13 +0900)
committer
Ben Pfaff
<blp@nicira.com>
Tue, 4 Nov 2014 16:43:09 +0000
(08:43 -0800)
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>
lib/match.c
patch
|
blob
|
history
diff --git
a/lib/match.c
b/lib/match.c
index
cbfd735
..
bd3b13d
100644
(file)
--- 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, ',')
;
}
}