summaryrefslogtreecommitdiff
path: root/libre/psensor/is_error.patch
blob: 60aaa2d076eb8f9858d1026fbd51e21980e98e39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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;