Browse Source

Update HTTP Daemon

master
Rafal Kupiec 6 years ago
parent
commit
79185ea0b4
1 changed files with 4 additions and 5 deletions
  1. 4
    5
      kuhttpd.c

+ 4
- 5
kuhttpd.c View File

@@ -1706,17 +1706,17 @@ static char** make_argp(void) {
1706 1706
 	char* cp2;
1707 1707
 
1708 1708
 	argp = (char**) malloc((strlen(query) + 2) * sizeof(char*));
1709
-	if(argp == (char**) 0) {
1710
-		return (char**) 0;
1709
+	if(argp == NULL) {
1710
+		return NULL;
1711 1711
 	}
1712 1712
 	argp[0] = strrchr(file, '/');
1713
-	if(argp[0] != (char*) 0) {
1713
+	if(argp[0] != NULL) {
1714 1714
 		++argp[0];
1715 1715
 	} else {
1716 1716
 		argp[0] = file;
1717 1717
 	}
1718 1718
 	argn = 1;
1719
-	if(strchr(query, '=') == (char*) 0) {
1719
+	if(strchr(query, '=') == NULL) {
1720 1720
 		for(cp1 = cp2 = query; *cp2 != '\0'; ++cp2) {
1721 1721
 			if(*cp2 == '+') {
1722 1722
 				*cp2 = '\0';
@@ -2133,7 +2133,6 @@ static void send_error_tail(void) {
2133 2133
 }
2134 2134
 
2135 2135
 static void send_redirect(char* extra_header, char* hostname, char* new_location, int is_ssl) {
2136
-	int extra_length = 0;
2137 2136
 	char extra_header_buf[5000];
2138 2137
 	const char *sep = new_location[0] == '/' ? "" : "/";
2139 2138
 	const char *proto = is_ssl == 1 ? "https://" : "http://";

Loading…
Cancel
Save