mirror of
https://github.com/nginx/nginx.git
synced 2025-06-27 00:40:40 +08:00
QUIC: moved a variable initialization near to its use.
This tends to produce slightly more optimal code with pos == NULL when built with Clang on low optimization levels. Spotted by Ruslan Ermilov.
This commit is contained in:
parent
f2859767d4
commit
a5b5b6ca0f
@ -1967,8 +1967,6 @@ ngx_quic_create_transport_params(u_char *pos, u_char *end, ngx_quic_tp_t *tp,
|
||||
p = ngx_cpymem(p, value.data, value.len); \
|
||||
} while (0)
|
||||
|
||||
p = pos;
|
||||
|
||||
len = ngx_quic_tp_len(NGX_QUIC_TP_INITIAL_MAX_DATA, tp->initial_max_data);
|
||||
|
||||
len += ngx_quic_tp_len(NGX_QUIC_TP_INITIAL_MAX_STREAMS_UNI,
|
||||
@ -2026,6 +2024,8 @@ ngx_quic_create_transport_params(u_char *pos, u_char *end, ngx_quic_tp_t *tp,
|
||||
return len;
|
||||
}
|
||||
|
||||
p = pos;
|
||||
|
||||
ngx_quic_tp_vint(NGX_QUIC_TP_INITIAL_MAX_DATA,
|
||||
tp->initial_max_data);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user