ovsdb-data: Fix warnings.
authorEthan Jackson <ethan@nicira.com>
Thu, 13 Jan 2011 01:26:00 +0000 (17:26 -0800)
committerEthan Jackson <ethan@nicira.com>
Thu, 13 Jan 2011 18:48:22 +0000 (10:48 -0800)
This commit fixes "may be used uninitialized" warnings in
ovsdb-data.c

lib/ovsdb-data.c

index 492da7fa5d84051dafca71e7507fec492181e2f3..20d333eff177f6b93633f4b81d3bd627350d7acf 100644 (file)
@@ -264,6 +264,7 @@ unwrap_json(const struct json *json, const char *name,
         || (name && strcmp(json->u.array.elems[0]->u.string, name))
         || json->u.array.elems[1]->type != value_type)
     {
+        *value = NULL;
         return ovsdb_syntax_error(json, NULL, "expected [\"%s\", <%s>]", name,
                                   json_type_to_string(value_type));
     }