X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=lib%2Fjson.c;h=d26c89ed1c4535183ccf50ce12d328bf4716d29e;hb=597cf5a1c197e269ad4376364422e23f5405105f;hp=8fd9c3a7a5e488397bbc5ac0885373eda02ec367;hpb=a4af00400a835eb87569ba40e21874c05e872c0f;p=openvswitch diff --git a/lib/json.c b/lib/json.c index 8fd9c3a7..d26c89ed 100644 --- a/lib/json.c +++ b/lib/json.c @@ -277,7 +277,7 @@ json_real_create(double real) void json_object_put(struct json *json, const char *name, struct json *value) { - shash_add(json->u.object, name, value); + json_destroy(shash_replace(json->u.object, name, value)); } void @@ -832,7 +832,7 @@ json_string_unescape(const char *in, size_t in_len, char **outp) while (in < end) { if (*in == '"') { ds_clear(&out); - ds_put_cstr(&out, "quoted string may not include unescape \""); + ds_put_cstr(&out, "quoted string may not include unescaped \""); goto exit; } if (*in != '\\') {