diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2013-07-29 17:30:01 +0400 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2013-07-29 17:30:01 +0400 |
commit | ab1c05272a4078454d6a529bffe6f5918a0c0468 (patch) | |
tree | 6545977240a9d7a006a0a7a40896dcfb78242e99 /src/http/modules/perl | |
parent | e49d933ebccb5e86b749c94ddb378dafc28e435d (diff) | |
download | nginx-ab1c05272a4078454d6a529bffe6f5918a0c0468.tar.gz nginx-ab1c05272a4078454d6a529bffe6f5918a0c0468.zip |
Perl: fixed syntax usage for C preprocessor directives.
As per perlxs, C preprocessor directives should be at the first
non-whitespace of a line to avoid interpreting them as comments.
#if and #endif are moved so that there are no blank lines before them
to retain them as part of the function body.
Diffstat (limited to 'src/http/modules/perl')
-rw-r--r-- | src/http/modules/perl/nginx.xs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs index 77fb65373..71f17a8bb 100644 --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -261,13 +261,12 @@ header_in(r, key) sep = ';'; goto multi; } - - #if (NGX_HTTP_X_FORWARDED_FOR) +#if (NGX_HTTP_X_FORWARDED_FOR) if (hh->offset == offsetof(ngx_http_headers_in_t, x_forwarded_for)) { sep = ','; goto multi; } - #endif +#endif if (hh->offset) { @@ -898,8 +897,7 @@ variable(r, name, value = NULL) var.len = len; var.data = lowcase; - - #if (NGX_DEBUG) +#if (NGX_DEBUG) if (value) { ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, @@ -908,8 +906,7 @@ variable(r, name, value = NULL) ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "perl variable: \"%V\"", &var); } - - #endif +#endif vv = ngx_http_get_variable(r, &var, hash); if (vv == NULL) { |