summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2020-11-13 13:24:45 +0000
committerSergey Kandaurov <pluknet@nginx.com>2020-11-13 13:24:45 +0000
commitc092a7de0f7473e1d117792eb5b89e68894abdea (patch)
treeca2ee2b8ae80116e56f8ecaf939c6e8a49e2de8a /src
parenteb8f476d599306507300a82b4a26d2a2476b748c (diff)
downloadnginx-c092a7de0f7473e1d117792eb5b89e68894abdea.tar.gz
nginx-c092a7de0f7473e1d117792eb5b89e68894abdea.tar.bz2
QUIC: microoptimization in varint parsing.
Removed a useless mask from the value being shifted, since it is 1-byte wide.
Diffstat (limited to 'src')
-rw-r--r--src/event/ngx_event_quic_transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/event/ngx_event_quic_transport.c b/src/event/ngx_event_quic_transport.c
index 756b679e5..7f2c6e4eb 100644
--- a/src/event/ngx_event_quic_transport.c
+++ b/src/event/ngx_event_quic_transport.c
@@ -160,7 +160,7 @@ ngx_quic_parse_int(u_char *pos, u_char *end, uint64_t *out)
}
p = pos;
- len = 1 << ((*p & 0xc0) >> 6);
+ len = 1 << (*p >> 6);
value = *p++ & 0x3f;