Skip to content

Commit 51cf2ab

Browse files
committed
various coding style fixes.
1 parent d15338e commit 51cf2ab

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

src/ngx_http_array_var_module.c

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ ngx_http_array_split(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
158158
/* cf->args->nelts >= 3 + 1 */
159159

160160
if (value[3].len >= sizeof("to=") - 1
161-
&& ngx_str3cmp(value[3].data, 't', 'o', '='))
161+
&& ngx_str3cmp(value[3].data, 't', 'o', '='))
162162
{
163163
dd("array_split $sep $str to=$array");
164164
data->nargs = filter.size = 2;
@@ -186,10 +186,10 @@ ngx_http_array_split(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
186186
/* array_split $sep $str $max to=$array */
187187

188188
if (value[4].len < sizeof("to=") - 1
189-
|| ! (ngx_str3cmp(value[4].data, 't', 'o', '=')))
189+
|| ! (ngx_str3cmp(value[4].data, 't', 'o', '=')))
190190
{
191191
ngx_conf_log_error(NGX_LOG_ERR, cf, 0,
192-
"%V: expecting the \"to\" option at the "
192+
"%V: expecting the \"to\" option at the "
193193
"4th argument: \"%V\"",
194194
&cmd->name, &value[4]);
195195

@@ -215,9 +215,8 @@ ngx_http_array_split(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
215215

216216
unexpected_arg:
217217

218-
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
219-
"%V: unexpected argument \"%V\"",
220-
&cmd->name, bad_arg);
218+
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "%V: unexpected argument \"%V\"",
219+
&cmd->name, bad_arg);
221220

222221
return NGX_CONF_ERROR;
223222
}
@@ -280,12 +279,12 @@ ngx_http_array_map(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
280279
/* cf->args->nelts == 3 + 1 */
281280

282281
if (value[3].len < sizeof("to=") - 1
283-
|| ! (ngx_str3cmp(value[3].data, 't', 'o', '=')))
282+
|| ! (ngx_str3cmp(value[3].data, 't', 'o', '=')))
284283
{
285284
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
286-
"%V: expecting the \"to\" option at "
287-
"the 3rd argument: \"%V\"",
288-
&cmd->name, &value[3]);
285+
"%V: expecting the \"to\" option at "
286+
"the 3rd argument: \"%V\"",
287+
&cmd->name, &value[3]);
289288

290289
return NGX_CONF_ERROR;
291290
}
@@ -335,7 +334,7 @@ ngx_http_array_map_op(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
335334
/* cf->args->nelts == 3 + 1 */
336335

337336
if (value[3].len >= sizeof("to=") - 1
338-
&& ngx_str3cmp(value[3].data, 't', 'o', '='))
337+
&& ngx_str3cmp(value[3].data, 't', 'o', '='))
339338
{
340339
/* array_join $sep $str to=$array */
341340
filter.size = 2;
@@ -349,16 +348,16 @@ ngx_http_array_map_op(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
349348

350349
} else {
351350
return ndk_set_var_multi_value_core(cf, &target, &value[1],
352-
&filter);
351+
&filter);
353352
}
354353

355354
} else {
356355
bad_arg = &value[3];
357356
}
358357

359358
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
360-
"%V: unexpected argument \"%V\"",
361-
&cmd->name, bad_arg);
359+
"%V: unexpected argument \"%V\"",
360+
&cmd->name, bad_arg);
362361

363362
return NGX_CONF_ERROR;
364363
}
@@ -391,7 +390,7 @@ ngx_http_array_join(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
391390
/* cf->args->nelts == 3 + 1 */
392391

393392
if (value[3].len >= sizeof("to=") - 1
394-
&& ngx_str3cmp(value[3].data, 't', 'o', '='))
393+
&& ngx_str3cmp(value[3].data, 't', 'o', '='))
395394
{
396395
/* array_join $sep $str to=$array */
397396
filter.size = 2;
@@ -403,16 +402,16 @@ ngx_http_array_join(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
403402
bad_arg = &value[4];
404403
} else {
405404
return ndk_set_var_multi_value_core(cf, &target, &value[1],
406-
&filter);
405+
&filter);
407406
}
408407

409408
} else {
410409
bad_arg = &value[3];
411410
}
412411

413412
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
414-
"%V: unexpected argument \"%V\"",
415-
&cmd->name, bad_arg);
413+
"%V: unexpected argument \"%V\"",
414+
&cmd->name, bad_arg);
416415

417416
return NGX_CONF_ERROR;
418417
}

0 commit comments

Comments
 (0)