aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2014-04-09 18:15:32 +0400
committerValentin Bartenev <vbart@nginx.com>2014-04-09 18:15:32 +0400
commit7da40e6a99fb247d5d97af25cae0c50ed5e55629 (patch)
tree4bc100722e0300580e9ce61410a10e3e5828a9b0 /src
parent5d3f84e4e1010afa5028ee013117c11ecb0f689a (diff)
downloadnginx-7da40e6a99fb247d5d97af25cae0c50ed5e55629.tar.gz
nginx-7da40e6a99fb247d5d97af25cae0c50ed5e55629.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_spdy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_spdy.c b/src/http/ngx_http_spdy.c
index 4f3ea1edc..b935b6fdd 100644
--- a/src/http/ngx_http_spdy.c
+++ b/src/http/ngx_http_spdy.c
@@ -1412,8 +1412,6 @@ ngx_http_spdy_state_data(ngx_http_spdy_connection_t *sc, u_char *pos,
{
ngx_http_spdy_stream_t *stream;
- stream = sc->stream;
-
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, sc->connection->log, 0,
"spdy DATA frame");
@@ -1441,6 +1439,8 @@ ngx_http_spdy_state_data(ngx_http_spdy_connection_t *sc, u_char *pos,
sc->recv_window = NGX_SPDY_MAX_WINDOW;
}
+ stream = sc->stream;
+
if (stream == NULL) {
return ngx_http_spdy_state_skip(sc, pos, end);
}