projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovs-vsctl: Add options parsing infrastructure.
[openvswitch]
/
lib
/
json.c
diff --git
a/lib/json.c
b/lib/json.c
index c31f418af07e0c814c1c3f9e83e50174c22f9469..d162fd5143bfc9e8cd3994007655c46ccca989f8 100644
(file)
--- a/
lib/json.c
+++ b/
lib/json.c
@@
-222,6
+222,14
@@
json_array_create(struct json **elements, size_t n)
return json;
}
return json;
}
+struct json *
+json_array_create_1(struct json *elem0)
+{
+ struct json **elems = xmalloc(sizeof *elems);
+ elems[0] = elem0;
+ return json_array_create(elems, 1);
+}
+
struct json *
json_array_create_2(struct json *elem0, struct json *elem1)
{
struct json *
json_array_create_2(struct json *elem0, struct json *elem1)
{