[PATCH 2/6] net: ceph: messenger: fix coding style comparison to NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes the comparison to NULL format in order to follow linux
kernel coding style.

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

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 424d76b..7a8bc51 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -3249,7 +3249,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags,
 	struct ceph_msg *m;
 
 	m = kmem_cache_zalloc(ceph_msg_cache, flags);
-	if (m == NULL)
+	if (!m)
 		goto out;
 
 	m->hdr.type = cpu_to_le16(type);
@@ -3263,7 +3263,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags,
 	/* front */
 	if (front_len) {
 		m->front.iov_base = ceph_kvmalloc(front_len, flags);
-		if (m->front.iov_base == NULL) {
+		if (!m->front.iov_base) {
 			dout("ceph_msg_new can't allocate %d bytes\n",
 			     front_len);
 			goto out2;
-- 
2.6.4

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux