diff -r d982c42802b4 quark.c --- a/quark.c Wed Apr 20 08:57:13 2011 +0200 +++ b/quark.c Wed Apr 20 09:00:29 2011 +0200 @@ -18,12 +18,12 @@ #include #include -#define LENGTH(x) (sizeof x / sizeof x[0]) -#define MAXBUFLEN 1024 +#define LENGTH(x) (sizeof x / sizeof x[0]) +#define MAXBUFLEN 1024 enum { - GET = 4, - HEAD = 5, + GET = 4, + HEAD = 5, }; typedef struct { @@ -52,11 +52,11 @@ void (*handle)(const Request *r); } RequestHandler; -static const char HttpOk[] = "200 OK"; -static const char HttpMoved[] = "302 Moved Permanently"; -static const char HttpUnauthorized[] = "401 Unauthorized"; -static const char HttpNotFound[] = "404 Not Found"; -static const char texthtml[] = "text/html"; +static const char HttpOk[] = "200 OK"; +static const char HttpMoved[] = "302 Moved Permanently"; +static const char HttpUnauthorized[] = "401 Unauthorized"; +static const char HttpNotFound[] = "404 Not Found"; +static const char texthtml[] = "text/html"; static ssize_t writetext(const char *buf); static ssize_t writedata(const char *buf, size_t buflen); @@ -265,7 +265,7 @@ if(e->d_name[0] == '.') /* ignore hidden files, ., .. */ continue; if(snprintf(resbuf, MAXBUFLEN, "%s
\r\n", - reqbuf, e->d_name, e->d_name) >= MAXBUFLEN) + reqbuf, e->d_name, e->d_name) >= MAXBUFLEN) { logerrmsg("snprintf failed, buffer sizeof exceeded"); return;