Skip to content

Commit 6c96ea6

Browse files
committed
Remove unnecessary casts in ngx_strcmp.
Change-Id: I667d13ba310da62c38837952f4ba94d159767c8e Signed-off-by: Piotr Sikora <[email protected]>
1 parent 9649964 commit 6c96ea6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ngx_cache_purge_module.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,11 +1040,11 @@ ngx_http_cache_purge_conf(ngx_conf_t *cf, ngx_http_cache_purge_conf_t *cpcf)
10401040

10411041
value = cf->args->elts;
10421042

1043-
if (ngx_strcmp(value[1].data, (u_char *) "off") == 0) {
1043+
if (ngx_strcmp(value[1].data, "off") == 0) {
10441044
cpcf->enable = 0;
10451045
return NGX_CONF_OK;
10461046

1047-
} else if (ngx_strcmp(value[1].data, (u_char *) "on") == 0) {
1047+
} else if (ngx_strcmp(value[1].data, "on") == 0) {
10481048
ngx_str_set(&cpcf->method, "PURGE");
10491049

10501050
} else {
@@ -1057,14 +1057,14 @@ ngx_http_cache_purge_conf(ngx_conf_t *cf, ngx_http_cache_purge_conf_t *cpcf)
10571057
}
10581058

10591059
/* sanity check */
1060-
if (ngx_strcmp(value[2].data, (u_char *) "from") != 0) {
1060+
if (ngx_strcmp(value[2].data, "from") != 0) {
10611061
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
10621062
"invalid parameter \"%V\", expected"
10631063
" \"from\" keyword", &value[2]);
10641064
return NGX_CONF_ERROR;
10651065
}
10661066

1067-
if (ngx_strcmp(value[3].data, (u_char *) "all") == 0) {
1067+
if (ngx_strcmp(value[3].data, "all") == 0) {
10681068
cpcf->enable = 1;
10691069
return NGX_CONF_OK;
10701070
}

0 commit comments

Comments
 (0)