diff --git a/kuhttpd.c b/kuhttpd.c index 17b8a6d..cda2d6b 100644 --- a/kuhttpd.c +++ b/kuhttpd.c @@ -1706,17 +1706,17 @@ static char** make_argp(void) { char* cp2; argp = (char**) malloc((strlen(query) + 2) * sizeof(char*)); - if(argp == (char**) 0) { - return (char**) 0; + if(argp == NULL) { + return NULL; } argp[0] = strrchr(file, '/'); - if(argp[0] != (char*) 0) { + if(argp[0] != NULL) { ++argp[0]; } else { argp[0] = file; } argn = 1; - if(strchr(query, '=') == (char*) 0) { + if(strchr(query, '=') == NULL) { for(cp1 = cp2 = query; *cp2 != '\0'; ++cp2) { if(*cp2 == '+') { *cp2 = '\0'; @@ -2133,7 +2133,6 @@ static void send_error_tail(void) { } static void send_redirect(char* extra_header, char* hostname, char* new_location, int is_ssl) { - int extra_length = 0; char extra_header_buf[5000]; const char *sep = new_location[0] == '/' ? "" : "/"; const char *proto = is_ssl == 1 ? "https://" : "http://";