Mercurial > hg > nginx-quic
comparison src/http/ngx_http_spdy.c @ 5650:363395795384
SPDY: moved a variable initialization near to its check.
This should prevent attempts of using pointer before it was checked, since
all modern compilers are able to spot access to uninitialized variable.
No functional changes.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Wed, 09 Apr 2014 18:15:32 +0400 |
parents | e1dcb983d6b3 |
children | b6240baead00 |
comparison
equal
deleted
inserted
replaced
5649:e1dcb983d6b3 | 5650:363395795384 |
---|---|
1410 ngx_http_spdy_state_data(ngx_http_spdy_connection_t *sc, u_char *pos, | 1410 ngx_http_spdy_state_data(ngx_http_spdy_connection_t *sc, u_char *pos, |
1411 u_char *end) | 1411 u_char *end) |
1412 { | 1412 { |
1413 ngx_http_spdy_stream_t *stream; | 1413 ngx_http_spdy_stream_t *stream; |
1414 | 1414 |
1415 stream = sc->stream; | |
1416 | |
1417 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0, | 1415 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0, |
1418 "spdy DATA frame"); | 1416 "spdy DATA frame"); |
1419 | 1417 |
1420 if (sc->length > sc->recv_window) { | 1418 if (sc->length > sc->recv_window) { |
1421 ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0, | 1419 ngx_log_error(NGX_LOG_INFO, sc->connection->log, 0, |
1438 return ngx_http_spdy_state_internal_error(sc); | 1436 return ngx_http_spdy_state_internal_error(sc); |
1439 } | 1437 } |
1440 | 1438 |
1441 sc->recv_window = NGX_SPDY_MAX_WINDOW; | 1439 sc->recv_window = NGX_SPDY_MAX_WINDOW; |
1442 } | 1440 } |
1441 | |
1442 stream = sc->stream; | |
1443 | 1443 |
1444 if (stream == NULL) { | 1444 if (stream == NULL) { |
1445 return ngx_http_spdy_state_skip(sc, pos, end); | 1445 return ngx_http_spdy_state_skip(sc, pos, end); |
1446 } | 1446 } |
1447 | 1447 |