diff options
author | Freemor <freemor@freemor.ca> | 2018-08-23 15:54:43 -0300 |
---|---|---|
committer | Freemor <freemor@freemor.ca> | 2018-08-23 15:55:05 -0300 |
commit | 269876ceac6f8d5e65ce93731a6c214c9c429c5c (patch) | |
tree | 60db189eb4a37dc8f5c261b2139c7fbd68f44d6d /libre/psensor/is_error.patch | |
parent | 6f9a73dc94891a018da5f22f435fb4ffcd24a8bd (diff) | |
download | abslibre-269876ceac6f8d5e65ce93731a6c214c9c429c5c.tar.gz abslibre-269876ceac6f8d5e65ce93731a6c214c9c429c5c.tar.bz2 abslibre-269876ceac6f8d5e65ce93731a6c214c9c429c5c.zip |
Libre version of psensor without nonfree libxnvctrl
Diffstat (limited to 'libre/psensor/is_error.patch')
-rw-r--r-- | libre/psensor/is_error.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libre/psensor/is_error.patch b/libre/psensor/is_error.patch new file mode 100644 index 000000000..60aaa2d07 --- /dev/null +++ b/libre/psensor/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; + |