json: Remove unused return value from json_parser_push().
authorBen Pfaff <blp@nicira.com>
Sun, 22 Aug 2010 20:38:39 +0000 (13:38 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 25 Aug 2010 21:55:47 +0000 (14:55 -0700)
No point in returning a value that no caller uses.

lib/json.c

index b08540e..3b70e6b 100644 (file)
@@ -1186,7 +1186,7 @@ json_parser_put_value(struct json_parser *p, struct json *value)
     }
 }
 
-static struct json_parser_node *
+static void
 json_parser_push(struct json_parser *p,
                  struct json *new_json, enum json_parse_state new_state)
 {
@@ -1205,12 +1205,10 @@ json_parser_push(struct json_parser *p,
         node = &p->stack[p->height++];
         node->json = new_json;
         p->parse_state = new_state;
-        return node;
     } else {
         json_destroy(new_json);
         json_error(p, "input exceeds maximum nesting depth %d",
                    JSON_MAX_HEIGHT);
-        return NULL;
     }
 }