Fix warnings and Windows compile problems

This commit is contained in:
Malcolm Robb 2014-10-29 19:00:42 +00:00
parent 3447f7ec83
commit 5f18f6cbca
2 changed files with 3 additions and 4 deletions

View file

@ -782,9 +782,8 @@ int handleHTTPRequest(struct client *c, char *p) {
}
if (clen < 0) {
char buf[128];
content = realloc(content, sizeof(buf));
clen = snprintf(content,sizeof(buf),"Error opening HTML file: %s", strerror(errno));
content = realloc(content, 128);
clen = snprintf(content, 128,"Error opening HTML file: %s", strerror(errno));
statuscode = 404;
}