diff mbox series

[v2,7/8] object.c: normalize brace style in object_as_type()

Message ID patch-7.8-893b178573-20210420T133218Z-avarab@gmail.com (mailing list archive)
State New
Headers show
Series object.c: add and use "is expected" utility function + object_as_type() use | expand

Commit Message

Ævar Arnfjörð Bjarmason April 20, 2021, 1:36 p.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 0f07f976fb..f694db7e87 100644
--- a/object.c
+++ b/object.c
@@ -190,16 +190,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),