From 62bb4e5460c7a33fc5e8fbcb8d0ce0bdbc26e9ab Mon Sep 17 00:00:00 2001 From: c9s Date: Thu, 22 May 2014 22:26:14 +0800 Subject: [PATCH] remove unnecessary pointer check --- src/node.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/node.c b/src/node.c index 302c20e..671974b 100644 --- a/src/node.c +++ b/src/node.c @@ -246,10 +246,8 @@ match_entry * match_entry_createl(char * path, int path_len) { } void match_entry_free(match_entry * entry) { - if (entry) { - str_array_free(entry->vars); - zfree(entry); - } + str_array_free(entry->vars); + zfree(entry); } @@ -396,9 +394,7 @@ route * r3_route_create(char * path) { } void r3_route_free(route * route) { - if (route) { - zfree(route); - } + zfree(route); } route * r3_route_createl(char * path, int path_len) {