Skip to content

redundant return code check #164

@leeriorio

Description

@leeriorio

In result of static analyse of nginx sources (including headers-more-nginx-module) with Svace static analyzer I found minor error of cathegory "REDUNDANT_COMPARISON.ALWAYS_FALSE" in ngx_http_headers_more_filter_module.c.

if (multi_http_blocks || hmcf->requires_filter) {
rc = ngx_http_headers_more_filter_init(cf);
if (rc != NGX_OK) {
return rc;
}
}

calling function ngx_http_headers_more_filter_init returns NGX_OK code only. Is it correct to check it there?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions