changeset 6232:5f2a0739da19

Perl: fixed warning about "sep" may be used uninitialized.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 18 Aug 2015 16:26:05 +0300
parents 5def760fe95e
children c6cc0b79a43d
files src/http/modules/perl/nginx.xs
diffstat 1 files changed, 6 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/perl/nginx.xs
+++ b/src/http/modules/perl/nginx.xs
@@ -268,18 +268,15 @@ 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);
 
-            if (*ph) {
-                ngx_http_perl_set_targ((*ph)->value.data, (*ph)->value.len);
+            goto done;
+        }
 
-                goto done;
-            }
-
-            XSRETURN_UNDEF;
-        }
+        XSRETURN_UNDEF;
 
     multi: