diff src/event/ngx_event_quic_transport.c @ 8636:ad7ca043edf5 quic

QUIC: microoptimization in varint parsing. Removed a useless mask from the value being shifted, since it is 1-byte wide.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 13 Nov 2020 13:24:45 +0000
parents 831d1960826f
children 46374c3fee3f
line wrap: on
line diff
--- a/src/event/ngx_event_quic_transport.c	Tue Nov 10 20:42:45 2020 +0000
+++ b/src/event/ngx_event_quic_transport.c	Fri Nov 13 13:24:45 2020 +0000
@@ -160,7 +160,7 @@
     }
 
     p = pos;
-    len = 1 << ((*p & 0xc0) >> 6);
+    len = 1 << (*p >> 6);
 
     value = *p++ & 0x3f;