| Date: Fri, 16 Jun 2017 18:21:46 +0200
remove some redundant checks
- freeelem checks for nil.
- free(nil) is valid too.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat:
M handlr.c | 6 ++----
M ind.c | 3 +--
2 files changed, 3 insertions(+), 6 deletions(-)
--- |
| @@ -172,8 +172,7 @@ handlecgi(int sock, char *file, char *port, char *base, char *args,
break;
default:
wait(NULL);
- if (path != nil)
- free(path);
+ free(path);
break;
}
}
@@ -238,8 +237,7 @@ handledcgi(int sock, char *file, char *port, char *base, char *args,
dprintf(sock, ".\r\n");
wait(NULL);
- if (path != nil)
- free(path);
+ free(path);
break;
}
} |