changeset 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 b51bd021808b
files src/http/ngx_http_spdy.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_spdy.c	Tue Apr 08 20:12:30 2014 +0400
+++ b/src/http/ngx_http_spdy.c	Wed Apr 09 18:15:32 2014 +0400
@@ -1412,8 +1412,6 @@
 {
     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 @@
         sc->recv_window = NGX_SPDY_MAX_WINDOW;
     }
 
+    stream = sc->stream;
+
     if (stream == NULL) {
         return ngx_http_spdy_state_skip(sc, pos, end);
     }