Update CHANGES, change version to 1.2+
[jansson.git] / doc / github_commits.c
index 5af01f0..8a362eb 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * 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>
 
@@ -120,7 +127,7 @@ int main(int argc, char *argv[])
     }
 
     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;
@@ -139,14 +146,14 @@ int main(int argc, char *argv[])
         }
 
         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;