From: Sergey Kandaurov Date: Fri, 13 Nov 2020 13:24:45 +0000 (+0000) Subject: QUIC: microoptimization in varint parsing. X-Git-Tag: release-1.25.0~4^2~473 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=c092a7de0f7473e1d117792eb5b89e68894abdea;p=nginx.git QUIC: microoptimization in varint parsing. Removed a useless mask from the value being shifted, since it is 1-byte wide. --- 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;