This commit is contained in:
osboxes.org 2019-12-31 21:39:55 +01:00
commit 1ec7bd1388

View file

@ -119,7 +119,7 @@ json_t *json_null(void);
static JSON_INLINE static JSON_INLINE
json_t *json_incref(json_t *json) { json_t *json_incref(json_t *json) {
if (json && json->refcount != (size_t) -1) if (json && json->refcount != (size_t) - 1)
JSON_INTERNAL_INCREF(json); JSON_INTERNAL_INCREF(json);
return json; return json;
} }
@ -129,7 +129,7 @@ void json_delete(json_t *json);
static JSON_INLINE static JSON_INLINE
void json_decref(json_t *json) { void json_decref(json_t *json) {
if (json && json->refcount != (size_t) -1 && JSON_INTERNAL_DECREF(json) == 0) if (json && json->refcount != (size_t) - 1 && JSON_INTERNAL_DECREF(json) == 0)
json_delete(json); json_delete(json);
} }