]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fixup declaration after statement warning
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 14 Jul 2016 11:17:38 +0000 (11:17 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 14 Jul 2016 11:17:38 +0000 (11:17 +0000)
git-svn-id: file:///svn/unbound/trunk@3816 be551aaa-1e26-0410-a405-d3ace91eadb9

util/netevent.c

index bbf5079c44b7d29e68c433841b7ad0fc2ee6dfd2..c6a99cd7459ed4bad6a520871d47662b924b73a8 100644 (file)
@@ -1361,7 +1361,6 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
           otherwise fall through to normal write */
        /* Also, TFO not available on WINDOWS at the moment */
        if(c->tcp_do_fastopen == 1) {
-               c->tcp_do_fastopen = 0;
                /* We need to have all the bytes to send in one buffer to try a single
                   sendto() for the message to go in the syn packet, so we must
                   create that buffer here, even though it means a malloc. 
@@ -1369,6 +1368,7 @@ comm_point_tcp_handle_write(int fd, struct comm_point* c)
                    (inc length) in one buffer this code should use that mechanism.*/
                struct sldns_buffer* sendto_buf = NULL;
                uint16_t len = sldns_buffer_limit(c->buffer);
+               c->tcp_do_fastopen = 0;
                sendto_buf = sldns_buffer_new(len + sizeof(uint16_t));
                if (!sendto_buf)
                        return 0;