[ovs-dev] [PATCH 6/8] json: Remove unused return value from json_parser_push().

Ben Pfaff blp at nicira.com
Mon Aug 23 19:19:55 UTC 2010


No point in returning a value that no caller uses.
---
 lib/json.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/lib/json.c b/lib/json.c
index b08540e..3b70e6b 100644
--- a/lib/json.c
+++ b/lib/json.c
@@ -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;
     }
 }
 
-- 
1.7.1





More information about the dev mailing list