]> granicus.if.org Git - libevent/blobdiff - http.c
Optimize arc4random_uniform() (by syncing with OpenBSD implementation)
[libevent] / http.c
diff --git a/http.c b/http.c
index aeeab4ac2690480f0eb21d6beac05a16947a1019..43879f39152a449b70c3a0ea89c97b882a1ad5e4 100644 (file)
--- a/http.c
+++ b/http.c
@@ -3555,7 +3555,6 @@ evhttp_parse_query_impl(const char *str, struct evkeyvalq *headers,
     int is_whole_uri, unsigned flags)
 {
        char *line=NULL;
-       char *argument;
        char *p;
        const char *query_part;
        int result = -1;
@@ -3583,13 +3582,12 @@ evhttp_parse_query_impl(const char *str, struct evkeyvalq *headers,
                goto error;
        }
 
-       p = argument = line;
+       p = line;
        while (p != NULL && *p != '\0') {
                char *key, *value, *decoded_value;
                int err;
-               argument = strsep(&p, "&");
 
-               value = argument;
+               value = strsep(&p, "&");
                key = strsep(&value, "=");
                if (flags & EVHTTP_URI_QUERY_NONCONFORMANT) {
                        if (value == NULL)