Skip to content

Commit bea943b

Browse files
committed
Fix indent in apache2/msc_json.c
1 parent 24508d6 commit bea943b

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

apache2/msc_json.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static int yajl_start_array(void *ctx) {
187187
msr->json->current_depth++;
188188
if (msr->json->current_depth > msr->txcfg->reqbody_json_depth_limit) {
189189
msr->json->depth_limit_exceeded = 1;
190-
return 0;
190+
return 0;
191191
}
192192

193193
if (msr->txcfg->debuglog_level >= 9) {
@@ -262,7 +262,7 @@ static int yajl_start_map(void *ctx)
262262
msr->json->current_depth++;
263263
if (msr->json->current_depth > msr->txcfg->reqbody_json_depth_limit) {
264264
msr->json->depth_limit_exceeded = 1;
265-
return 0;
265+
return 0;
266266
}
267267

268268
if (msr->txcfg->debuglog_level >= 9) {
@@ -384,16 +384,16 @@ int json_process_chunk(modsec_rec *msr, const char *buf, unsigned int size, char
384384
/* Feed our parser and catch any errors */
385385
msr->json->status = yajl_parse(msr->json->handle, buf, size);
386386
if (msr->json->status != yajl_status_ok) {
387-
if (msr->json->depth_limit_exceeded) {
388-
*error_msg = "JSON depth limit exceeded";
389-
} else {
390-
if (msr->json->yajl_error) *error_msg = msr->json->yajl_error;
391-
else {
392-
char* yajl_err = yajl_get_error(msr->json->handle, 0, buf, size);
393-
*error_msg = apr_pstrdup(msr->mp, yajl_err);
394-
yajl_free_error(msr->json->handle, yajl_err);
387+
if (msr->json->depth_limit_exceeded) {
388+
*error_msg = "JSON depth limit exceeded";
389+
} else {
390+
if (msr->json->yajl_error) *error_msg = msr->json->yajl_error;
391+
else {
392+
char* yajl_err = yajl_get_error(msr->json->handle, 0, buf, size);
393+
*error_msg = apr_pstrdup(msr->mp, yajl_err);
394+
yajl_free_error(msr->json->handle, yajl_err);
395+
}
395396
}
396-
}
397397
return -1;
398398
}
399399

@@ -413,13 +413,13 @@ int json_complete(modsec_rec *msr, char **error_msg) {
413413
/* Wrap up the parsing process */
414414
msr->json->status = yajl_complete_parse(msr->json->handle);
415415
if (msr->json->status != yajl_status_ok) {
416-
if (msr->json->depth_limit_exceeded) {
417-
*error_msg = "JSON depth limit exceeded";
418-
} else {
419-
char *yajl_err = yajl_get_error(msr->json->handle, 0, NULL, 0);
420-
*error_msg = apr_pstrdup(msr->mp, yajl_err);
421-
yajl_free_error(msr->json->handle, yajl_err);
422-
}
416+
if (msr->json->depth_limit_exceeded) {
417+
*error_msg = "JSON depth limit exceeded";
418+
} else {
419+
char *yajl_err = yajl_get_error(msr->json->handle, 0, NULL, 0);
420+
*error_msg = apr_pstrdup(msr->mp, yajl_err);
421+
yajl_free_error(msr->json->handle, yajl_err);
422+
}
423423

424424
return -1;
425425
}

0 commit comments

Comments
 (0)