wdp-xflow: Remove wx structure from global list when closing.
[sliver-openvswitch.git] / ovsdb / mutation.c
index 1b42280..9f09d59 100644 (file)
@@ -72,7 +72,7 @@ type_mismatch(const struct ovsdb_mutation *m, const struct json *json)
 static WARN_UNUSED_RESULT struct ovsdb_error *
 ovsdb_mutation_from_json(const struct ovsdb_table_schema *ts,
                          const struct json *json,
-                         const struct ovsdb_symbol_table *symtab,
+                         struct ovsdb_symbol_table *symtab,
                          struct ovsdb_mutation *m)
 {
     const struct json_array *array;
@@ -164,7 +164,7 @@ ovsdb_mutation_free(struct ovsdb_mutation *m)
 struct ovsdb_error *
 ovsdb_mutation_set_from_json(const struct ovsdb_table_schema *ts,
                              const struct json *json,
-                             const struct ovsdb_symbol_table *symtab,
+                             struct ovsdb_symbol_table *symtab,
                              struct ovsdb_mutation_set *set)
 {
     const struct json_array *array = json_array(json);
@@ -310,7 +310,7 @@ mutate_scalar(const struct ovsdb_type *dst_type, struct ovsdb_datum *dst,
         }
     }
 
-    error = ovsdb_datum_sort(dst, dst_type);
+    error = ovsdb_datum_sort(dst, dst_type->key.type);
     if (error) {
         ovsdb_error_destroy(error);
         return ovsdb_error("constraint violation",
@@ -379,6 +379,9 @@ ovsdb_mutation_set_execute(struct ovsdb_row *row,
             ovsdb_datum_subtract(dst, dst_type, arg, arg_type);
             error = ovsdb_mutation_check_count(dst, dst_type);
             break;
+
+        default:
+            NOT_REACHED();
         }
         if (error) {
             return error;