[6/6] net: ceph: messenger: add braces to all arms of conditional statement
diff mbox

Message ID d725aa09232a92e16e86cf6c320a602adfaef87c.1453853617.git.ciorneiioana@gmail.com
State New
Headers show

Commit Message

Ioana Ciornei Jan. 27, 2016, 12:43 a.m. UTC
This patch adds curly braces to all arms of the conditional statement in
order to follow the linux kernel coding style. Warnings found using
checkpatch.pl.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
---
 net/ceph/messenger.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Patch
diff mbox

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 8f1582e..eb71add 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -1313,8 +1313,10 @@  static void prepare_write_message(struct ceph_connection *con)
 			     m->middle->vec.iov_base,
 			     m->middle->vec.iov_len);
 		con->out_msg->footer.middle_crc = cpu_to_le32(crc);
-	} else
+	} else {
 		con->out_msg->footer.middle_crc = 0;
+	}
+
 	dout("%s front_crc %u middle_crc %u\n", __func__,
 	     le32_to_cpu(con->out_msg->footer.front_crc),
 	     le32_to_cpu(con->out_msg->footer.middle_crc));
@@ -1854,11 +1856,11 @@  static int ceph_dns_resolve_name(const char *name, size_t namelen,
 	delim_p = memchr(name, delim, namelen);
 	colon_p = memchr(name, ':', namelen);
 
-	if (delim_p && colon_p)
+	if (delim_p && colon_p) {
 		end = delim_p < colon_p ? delim_p : colon_p;
-	else if (!delim_p && colon_p)
+	} else if (!delim_p && colon_p) {
 		end = colon_p;
-	else {
+	} else {
 		end = delim_p;
 		if (!end) /* case: hostname:/ */
 			end = name + namelen;