diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-09-21 16:18:00 +0000 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-09-21 16:18:00 +0000 |
commit | 0b37868baf51c5278a8e31fde4116a6d0104d21f (patch) | |
tree | 27653e2b8f2f3a97aceeb6a80dca137d3f6cba9d /doc | |
parent | a6458cd3a9852b446b963e277e4269837a89a7df (diff) | |
download | libmicrohttpd-0b37868baf51c5278a8e31fde4116a6d0104d21f.tar.gz libmicrohttpd-0b37868baf51c5278a8e31fde4116a6d0104d21f.zip |
Fixed compiling examples on old compilers.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/responseheaders.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/examples/responseheaders.c b/doc/examples/responseheaders.c index 273a1e55..1ab89e0f 100644 --- a/doc/examples/responseheaders.c +++ b/doc/examples/responseheaders.c | |||
@@ -36,12 +36,12 @@ answer_to_connection (void *cls, struct MHD_Connection *connection, | |||
36 | if ( (-1 == (fd = open (FILENAME, O_RDONLY))) || | 36 | if ( (-1 == (fd = open (FILENAME, O_RDONLY))) || |
37 | (0 != fstat (fd, &sbuf)) ) | 37 | (0 != fstat (fd, &sbuf)) ) |
38 | { | 38 | { |
39 | /* error accessing file */ | ||
40 | if (fd != -1) | ||
41 | (void) close (fd); | ||
42 | const char *errorstr = | 39 | const char *errorstr = |
43 | "<html><body>An internal server error has occured!\ | 40 | "<html><body>An internal server error has occured!\ |
44 | </body></html>"; | 41 | </body></html>"; |
42 | /* error accessing file */ | ||
43 | if (fd != -1) | ||
44 | (void) close (fd); | ||
45 | response = | 45 | response = |
46 | MHD_create_response_from_buffer (strlen (errorstr), | 46 | MHD_create_response_from_buffer (strlen (errorstr), |
47 | (void *) errorstr, | 47 | (void *) errorstr, |