]> git.kaiwu.me - nginx.git/commitdiff
Perl: fixed warning about "sep" may be used uninitialized.
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 18 Aug 2015 13:26:05 +0000 (16:26 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 18 Aug 2015 13:26:05 +0000 (16:26 +0300)
src/http/modules/perl/nginx.xs

index 71f17a8bb459af8b21bf9b440d23bd3a35f5fa7b..ae8584502c9d00d378c59a2535cac8e5454e492d 100644 (file)
@@ -268,19 +268,16 @@ header_in(r, key)
         }
 #endif
 
-        if (hh->offset) {
+        ph = (ngx_table_elt_t **) ((char *) &r->headers_in + hh->offset);
 
-            ph = (ngx_table_elt_t **) ((char *) &r->headers_in + hh->offset);
-
-            if (*ph) {
-                ngx_http_perl_set_targ((*ph)->value.data, (*ph)->value.len);
-
-                goto done;
-            }
+        if (*ph) {
+            ngx_http_perl_set_targ((*ph)->value.data, (*ph)->value.len);
 
-            XSRETURN_UNDEF;
+            goto done;
         }
 
+        XSRETURN_UNDEF;
+
     multi:
 
         /* Cookie, X-Forwarded-For */