aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-01-24 02:09:43 +0000
committerChristian Grothoff <christian@grothoff.org>2009-01-24 02:09:43 +0000
commit0dafbfbb9588b4e7966a2a19fceedccfb477ad91 (patch)
tree92cf32ddbb0d398e9be20f6e4012e7cb8458e0d2
parentc9d38243c2990ecff32fba8f2d4e6c4427ab24af (diff)
downloadlibmicrohttpd-0dafbfbb9588b4e7966a2a19fceedccfb477ad91.tar.gz
libmicrohttpd-0dafbfbb9588b4e7966a2a19fceedccfb477ad91.zip
better
-rw-r--r--src/examples/querystring_example.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/examples/querystring_example.c b/src/examples/querystring_example.c
index d3b53693..a44a2786 100644
--- a/src/examples/querystring_example.c
+++ b/src/examples/querystring_example.c
@@ -54,6 +54,8 @@ ahc_echo (void *cls,
54 *ptr = NULL; /* reset when done */ 54 *ptr = NULL; /* reset when done */
55 val = MHD_lookup_connection_value (connection, MHD_GET_ARGUMENT_KIND, "q"); 55 val = MHD_lookup_connection_value (connection, MHD_GET_ARGUMENT_KIND, "q");
56 me = malloc (snprintf (NULL, 0, fmt, "q", val) + 1); 56 me = malloc (snprintf (NULL, 0, fmt, "q", val) + 1);
57 if (me == NULL)
58 return MHD_NO;
57 sprintf (me, fmt, "q", val); 59 sprintf (me, fmt, "q", val);
58 response = MHD_create_response_from_data (strlen (me), me, MHD_YES, MHD_NO); 60 response = MHD_create_response_from_data (strlen (me), me, MHD_YES, MHD_NO);
59 ret = MHD_queue_response (connection, MHD_HTTP_OK, response); 61 ret = MHD_queue_response (connection, MHD_HTTP_OK, response);