ovsdb-data: Allow spaces around '=' in key-value pairs.
authorBen Pfaff <blp@nicira.com>
Thu, 28 Jan 2010 18:09:15 +0000 (10:09 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 28 Jan 2010 22:22:40 +0000 (14:22 -0800)
This allows a = b, a= b, a =b, etc. whereas before only a=b was accepted.

lib/ovsdb-data.c

index 1f3a89d..8631016 100644 (file)
@@ -843,8 +843,10 @@ parse_key_value(const char **s, const struct ovsdb_type *type,
 
     error = parse_atom_token(s, type->key_type, key);
     if (!error && type->value_type != OVSDB_TYPE_VOID) {
+        *s = skip_spaces(*s);
         if (**s == '=') {
             (*s)++;
+            *s = skip_spaces(*s);
             error = parse_atom_token(s, type->value_type, value);
         } else {
             error = xasprintf("%s: syntax error at \"%c\" expecting \"=\"",