+/*
+ * Copyright (c) 2009, 2010 Petri Lehtinen <petri@digip.org>
+ *
+ * Jansson is free software; you can redistribute it and/or modify
+ * it under the terms of the MIT license. See LICENSE for details.
+ */
+
#include <stdlib.h>
#include <string.h>
}
commits = json_object_get(root, "commits");
- if(!commits || !json_is_array(commits))
+ if(!json_is_array(commits))
{
fprintf(stderr, "error: commits is not an array\n");
return 1;
}
id = json_object_get(commit, "id");
- if(!id || !json_is_string(id))
+ if(!json_is_string(id))
{
fprintf(stderr, "error: commit %d: id is not a string\n", i + 1);
return 1;
}
message = json_object_get(commit, "message");
- if(!message || !json_is_string(message))
+ if(!json_is_string(message))
{
fprintf(stderr, "error: commit %d: message is not a string\n", i + 1);
return 1;