summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2014-01-20 12:06:35 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2014-01-20 14:33:33 +0100
commit96ca358669cd32d17ce51f30de3cdbf0a1c0518c (patch)
tree107357826aa73bd683e3b571dc6847585b02a286
parent6175014ed77be6d1acd6420e36ca6582b573532c (diff)
quic: Fix test which is always true
find_model_params() is first doing *nbuckets = 0; and it then checks nbuckets for NULL. This is redundant as the dereferencing would cause a segfault if nbuckets was NULL, so the if (nbuckets) test can't be false. As Uri pointed out, the "/* bucket start */" comment on the same line probably implies that the test was meant to be 'if (*nbuckets)' I've ran a few test and I did not observe issues because of it...
-rw-r--r--common/quic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/quic.c b/common/quic.c
index 2cffde5..c10e3c4 100644
--- a/common/quic.c
+++ b/common/quic.c
@@ -954,7 +954,7 @@ static void find_model_params(Encoder *encoder,
bsize = *firstsize;
do { /* other buckets */
- if (nbuckets) { /* bucket start */
+ if (*nbuckets) { /* bucket start */
bstart = bend + 1;
} else {
bstart = 0;