[ovs-dev] [meter-bugs 1/6] ofpbuf: Allow whitespace other than spaces in hex data.
Ben Pfaff
blp at nicira.com
Tue Nov 5 06:42:27 UTC 2013
It's easier to cut and paste lines of hexadecimal data into a command line
if you don't have to worry about new-lines appearing in the command.
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
lib/ofpbuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ofpbuf.c b/lib/ofpbuf.c
index f7145db..d578ab5 100644
--- a/lib/ofpbuf.c
+++ b/lib/ofpbuf.c
@@ -407,7 +407,7 @@ ofpbuf_put_hex(struct ofpbuf *b, const char *s, size_t *n)
uint8_t byte;
bool ok;
- s += strspn(s, " ");
+ s += strspn(s, " \t\r\n");
byte = hexits_value(s, 2, &ok);
if (!ok) {
if (n) {
--
1.7.10.4
More information about the dev
mailing list