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:
41f562b
)
ofp-print: Use ds_chomp() in ofp10_match_to_string()
author
Simon Horman
<simon.horman@netronome.com>
Tue, 4 Nov 2014 06:14:04 +0000
(15:14 +0900)
committer
Ben Pfaff
<blp@nicira.com>
Tue, 4 Nov 2014 16:45:27 +0000
(08:45 -0800)
Slightly simplify ofp10_match_to_string() 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/ofp-print.c
patch
|
blob
|
history
diff --git
a/lib/ofp-print.c
b/lib/ofp-print.c
index
8dc7f06
..
d27d8a7
100644
(file)
--- a/
lib/ofp-print.c
+++ b/
lib/ofp-print.c
@@
-687,9
+687,7
@@
ofp10_match_to_string(const struct ofp10_match *om, int verbosity)
print_wild(&f, "tp_dst=", w & OFPFW10_TP_DST, verbosity,
"%d", ntohs(om->tp_dst));
}
- if (ds_last(&f) == ',') {
- f.length--;
- }
+ ds_chomp(&f, ',');
return ds_cstr(&f);
}