diff mbox series

[6/7] object.c: normalize brace style in object_as_type()

Message ID patch-6.7-e414cfe40c-20210409T083436Z-avarab@gmail.com (mailing list archive)
State Superseded
Headers show
Series object.c: add and use "is expected" utility function + object_as_type() use | expand

Commit Message

Ævar Arnfjörð Bjarmason April 9, 2021, 8:50 a.m. UTC
Normalize the brace style in this function introduced in
8ff226a9d5e (add object_as_type helper for casting objects,
2014-07-13) to be in line with the coding style of the project.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 object.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/object.c b/object.c
index 1573e571de..e3400d1039 100644
--- a/object.c
+++ b/object.c
@@ -196,16 +196,15 @@  char* oid_is_type_or_die_msg(const struct object_id *oid,
 
 void *object_as_type(struct object *obj, enum object_type type, int quiet)
 {
-	if (obj->type == type)
+	if (obj->type == type) {
 		return obj;
-	else if (obj->type == OBJ_NONE) {
+	} else if (obj->type == OBJ_NONE) {
 		if (type == OBJ_COMMIT)
 			init_commit_node((struct commit *) obj);
 		else
 			obj->type = type;
 		return obj;
-	}
-	else {
+	} else {
 		if (!quiet)
 			error(_(object_type_mismatch_msg),
 			      oid_to_hex(&obj->oid),