projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b4570a
)
handler: replace calls to deprecated json_object_object_get
author
Steven Barth
<steven@midlink.org>
Tue, 23 Dec 2014 13:29:47 +0000
(14:29 +0100)
committer
Steven Barth
<steven@midlink.org>
Tue, 23 Dec 2014 13:29:47 +0000
(14:29 +0100)
Signed-off-by: Steven Barth <steven@midlink.org>
handler.h
patch
|
blob
|
history
diff --git
a/handler.h
b/handler.h
index baf9c3c6c86c3137e1e727234031d4bc02df41b0..e96c05af13a3bbf9616d25b1c60a447b580d50e2 100644
(file)
--- a/
handler.h
+++ b/
handler.h
@@
-35,7
+35,8
@@
json_check_type(json_object *obj, json_type type)
static inline json_object *
json_get_field(json_object *obj, const char *name, json_type type)
{
- return json_check_type(json_object_object_get(obj, name), type);
+ return json_object_object_get_ex(obj, name, &obj) ?
+ json_check_type(obj, type) : NULL;
}
int netifd_open_subdir(const char *name);