diff --git a/conman.c b/conman.c index cb22490d..f68e8497 100644 --- a/conman.c +++ b/conman.c @@ -72,7 +72,7 @@ #include "sicshipadaba.h" #include "protocol.h" #include "sicsvar.h" -#include +#include /* Greetings from protocol.c for SCLogWrite... diff --git a/makefile_rhel7 b/makefile_rhel7 index 92574903..b8179403 100644 --- a/makefile_rhel7 +++ b/makefile_rhel7 @@ -21,7 +21,7 @@ include sllinux_def CC = gcc -CFLAGS = -I$(HDFROOT)/include -I$(EXTRAROOT)/include -DNXXML -DHDF5 $(NI) \ +CFLAGS = -I$(EXTRAROOT)/include -DNXXML -DHDF5 $(NI) \ -I$(SICSROOT)/sicspsi -I$(SICSROOT) -I. -MMD \ -Werror -DCYGNUS -DNONINTF $(DBG) $(DFORTIFY) \ -Wall -Wno-unused -Wunused-value -Wno-comment -Wno-switch diff --git a/protocol.c b/protocol.c index c95e8bc2..cb7e1be5 100644 --- a/protocol.c +++ b/protocol.c @@ -15,7 +15,7 @@ #include #include #include "protocol.h" -#include +#include #define MAXMSG 1024 #define INIT_STR_SIZE 256 @@ -492,7 +492,7 @@ struct json_object *mkJSON_Object(SConnection * pCon, char *pBuffer, pBueffel[0] = '\0'; msg_json = json_object_new_object(); - if (is_error(msg_json)) { + if (msg_json == NULL) { linenum = __LINE__; goto reporterr; } @@ -518,7 +518,7 @@ struct json_object *mkJSON_Object(SConnection * pCon, char *pBuffer, } if (iOut == eHdbValue || iOut == eHdbEvent) { tmp_json = json_tokener_parse(pBuffer); - if (is_error(tmp_json)) { + if (tmp_json == NULL) { linenum = __LINE__; goto reporterr; } @@ -533,7 +533,7 @@ struct json_object *mkJSON_Object(SConnection * pCon, char *pBuffer, pBufferTo++; } tmp_json = json_object_new_string(pBuffer); - if (is_error(tmp_json)) { + if (tmp_json == NULL) { linenum = __LINE__; goto reporterr; } @@ -548,9 +548,9 @@ reporterr: SCWrite(pCon, pError, eError); SCSetWriteFunc(pCon, SCWriteJSON_String); cleanup: - if (tmp_json != NULL && !is_error(tmp_json)) + if (tmp_json != NULL) json_object_put(tmp_json); - if (msg_json != NULL && !is_error(msg_json)) + if (msg_json != NULL) json_object_put(msg_json); return NULL; } @@ -598,9 +598,9 @@ int SCWriteJSON_String(SConnection * pCon, char *pBuffer, int iOut) iRet = SCDoSockWrite(pCon, (char *)json_object_to_json_string(my_object)); } } - if (tmp_json != NULL && !is_error(tmp_json)) + if (tmp_json != NULL ) json_object_put(tmp_json); - if (my_object != NULL && !is_error(my_object)) + if (my_object != NULL ) json_object_put(my_object); return iRet; }