]> granicus.if.org Git - libevent/commitdiff
evhttp_have_expect(): fix -Wlogical-not-parentheses
authorAzat Khuzhin <a3at.mail@gmail.com>
Fri, 25 Mar 2016 07:21:48 +0000 (10:21 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Fri, 25 Mar 2016 07:21:48 +0000 (10:21 +0300)
../http.c:589:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
        if (!req->kind == EVHTTP_REQUEST || !REQ_VERSION_ATLEAST(req, 1, 1))
                        ^          ~~

http.c

diff --git a/http.c b/http.c
index ac146075e1e11ef9a0b86196ea16f8419b8e595f..610d0f9c51930cb9ee55efc11cf8cd75f8d3a362 100644 (file)
--- a/http.c
+++ b/http.c
@@ -586,7 +586,7 @@ static enum expect evhttp_have_expect(struct evhttp_request *req, int input)
        const char *expect;
        struct evkeyvalq *h = input ? req->input_headers : req->output_headers;
 
-       if (!req->kind == EVHTTP_REQUEST || !REQ_VERSION_ATLEAST(req, 1, 1))
+       if (!(req->kind == EVHTTP_REQUEST) || !REQ_VERSION_ATLEAST(req, 1, 1))
                return NO;
 
        expect = evhttp_find_header(h, "Expect");