mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
26 lines
626 B
Diff
26 lines
626 B
Diff
--- 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;
|
|
|