]> git.sesse.net Git - cubemap/commitdiff
Fix serialization of Client::header_or_short_response_bytes_sent.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 22 Dec 2018 00:21:50 +0000 (01:21 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 22 Dec 2018 00:21:50 +0000 (01:21 +0100)
We used an uninitialized variable due to a typo. Found by Coverity Scan.

client.cpp

index 2552c6951067b4c99ebc192ad24ccb6a08fd9260..f02050b5588901fd31142558134899f59512464b 100644 (file)
@@ -134,7 +134,7 @@ ClientProto Client::serialize(unordered_map<const string *, size_t> *short_respo
                serialized.set_header_or_short_response_index(iterator_and_inserted.first->second);
        }
 
-       serialized.set_header_or_short_response_bytes_sent(serialized.header_or_short_response_bytes_sent());
+       serialized.set_header_or_short_response_bytes_sent(header_or_short_response_bytes_sent);
        serialized.set_stream_pos(stream_pos);
        serialized.set_stream_pos_end(stream_pos_end);
        serialized.set_bytes_sent(bytes_sent);