put braces around multi-line if (...)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c
index 8f1eb4b..f5822e1 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -1664,25 +1664,29 @@ gw_parse_querystring(struct gw_trans *gw_trans)
break;
}
- if ((p = gw_trans->gw_req->fieldmap[KEY_COMMIT_ID]))
+ if ((p = gw_trans->gw_req->fieldmap[KEY_COMMIT_ID])) {
if (asprintf(&gw_trans->commit, "%s",
p->parsed.s) == -1)
return got_error_from_errno("asprintf");
+ }
- if ((p = gw_trans->gw_req->fieldmap[KEY_FILE]))
+ if ((p = gw_trans->gw_req->fieldmap[KEY_FILE])) {
if (asprintf(&gw_trans->repo_file, "%s",
p->parsed.s) == -1)
return got_error_from_errno("asprintf");
+ }
- if ((p = gw_trans->gw_req->fieldmap[KEY_FOLDER]))
+ if ((p = gw_trans->gw_req->fieldmap[KEY_FOLDER])) {
if (asprintf(&gw_trans->repo_folder, "%s",
p->parsed.s) == -1)
return got_error_from_errno("asprintf");
+ }
- if ((p = gw_trans->gw_req->fieldmap[KEY_HEADREF]))
+ if ((p = gw_trans->gw_req->fieldmap[KEY_HEADREF])) {
if (asprintf(&gw_trans->headref, "%s",
p->parsed.s) == -1)
return got_error_from_errno("asprintf");
+ }
if (action == NULL) {
error = got_error_from_errno("invalid action");