Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace removed is_error macro #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bti.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ static void parse_timeline(char *document, struct session *session)
struct json_object *val; \
struct lh_entry *entry; \
for (entry = json_object_get_object(obj)->head; \
({ if(entry && !is_error(entry)) { \
({ if(entry && entry != NULL) { \
key = (char*)entry->k; \
val = (struct json_object*)entry->v; \
} ; entry; }); \
Expand Down Expand Up @@ -667,7 +667,7 @@ static int parse_response_json(char *document, struct session *session)

/* make global for now */
store_session = session;
if (!is_error(jobj)) {
if (jobj != NULL) {
/* guards against a json pre 0.10 bug */
json_parse(jobj,0);
}
Expand All @@ -692,7 +692,7 @@ static void parse_timeline_json(char *document, struct session *session)

/* make global for now */
store_session = session;
if (!is_error(jobj)) {
if (jobj != NULL) {
/* guards against a json pre 0.10 bug */
if (json_object_get_type(jobj)==json_type_array) {
json_parse_array(jobj, NULL, 0);
Expand Down