Commit Diff


commit - 5d1296dec4126178e32f8c775b0e6d65149f1810
commit + 26dc30046bbd01c7d59530d7de5695a77bf629de
blob - 8f1eb4b6da217e2cfb03af2c4bd46d3a3ee3db90
blob + f5822e1e2d91bc3b8a939f7dfcbfbb095e6b0902
--- gotweb/gotweb.c
+++ 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");