diff options
author | Térence Clastres | 2019-05-07 13:57:55 +0200 |
---|---|---|
committer | Térence Clastres | 2019-05-07 13:57:55 +0200 |
commit | 3eb9f878308d84bddabdb25d5998c2376e907707 (patch) | |
tree | f5f2469c3a5a31918b4ad622a49bf40620c97d7e /is_error.patch | |
download | aur-3eb9f878308d84bddabdb25d5998c2376e907707.tar.gz |
Initial commit
Diffstat (limited to 'is_error.patch')
-rw-r--r-- | is_error.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/is_error.patch b/is_error.patch new file mode 100644 index 000000000000..60aaa2d076eb --- /dev/null +++ b/is_error.patch @@ -0,0 +1,26 @@ +--- a/src/rsensor.c 2016-12-20 00:39:54.000000000 +0100 ++++ b/src/rsensor.c 2018-01-05 19:30:09.089759050 +0100 +@@ -133,7 +133,7 @@ + + obj = get_json_object(url); + +- if (obj && !is_error(obj)) { ++ if (obj && (obj != NULL)) { + n = json_object_array_length(obj); + sensors = malloc((n + 1) * sizeof(struct psensor *)); + +@@ -168,12 +168,12 @@ + + obj = get_json_object(get_url(s)); + +- if (obj && !is_error(obj)) { ++ if (obj && (obj != NULL)) { + json_object *om; + + json_object_object_get_ex(obj, "last_measure", &om); + +- if (!is_error(obj)) { ++ if (obj != NULL) { + json_object *ov, *ot; + struct timeval tv; + |