[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ab0f1fde-13cf-2bed-3874-14d214045e60@users.sourceforge.net>
Date: Sat, 10 Sep 2016 22:25:46 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: drbd-dev@...ts.linbit.com,
Lars Ellenberg <lars.ellenberg@...bit.com>,
Philipp Reisner <philipp.reisner@...bit.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 04/13] DRBD-receiver: Improve a size determination in
drbd_do_features()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 10 Sep 2016 19:46:05 +0200
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/block/drbd/drbd_receiver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 5526f6b..b5a3cf0 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -5208,7 +5208,7 @@ static int drbd_do_features(struct drbd_connection *connection)
{
/* ASSERT current == connection->receiver ... */
struct p_connection_features *p;
- const int expect = sizeof(struct p_connection_features);
+ const int expect = sizeof(*p);
struct packet_info pi;
int err;
--
2.10.0
Powered by blists - more mailing lists