From 7bbc41179c4fa0e4f4355767c498c9ab8ad6c434 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Sat, 23 Aug 2014 23:59:22 +0200 Subject: [PATCH] use json_object_object_get_ex instead of deprecated json_object_object_get fct. --- src/rsensor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rsensor.c b/src/rsensor.c index 32c182c..8a5aa66 100644 --- a/src/rsensor.c +++ b/src/rsensor.c @@ -163,14 +163,14 @@ void remote_psensor_update(struct psensor *s) if (obj && !is_error(obj)) { json_object *om; - om = json_object_object_get(obj, "last_measure"); + json_object_object_get_ex(obj, "last_measure", &om); if (!is_error(obj)) { json_object *ov, *ot; struct timeval tv; - ov = json_object_object_get(om, "value"); - ot = json_object_object_get(om, "time"); + json_object_object_get_ex(om, "value", &ov); + json_object_object_get_ex(om, "time", &ot); tv.tv_sec = json_object_get_int(ot); tv.tv_usec = 0; -- 2.7.4