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

[lvm-devel] [PATCH] Use correct array size!



Signed-off-by: Malahal Naineni (malahal us ibm com)

diff -r 5d08ba4ae8e8 -r 8db1b9ee17a8 daemons/dmeventd/dmeventd.c
--- a/daemons/dmeventd/dmeventd.c	Thu Mar 11 16:05:21 2010 -0800
+++ b/daemons/dmeventd/dmeventd.c	Fri Mar 12 16:15:25 2010 -0800
@@ -1369,7 +1369,7 @@ static int _handle_request(struct dm_eve
 		{ DM_EVENT_CMD_ACTIVE, _active},
 	}, *req;
 
-	for (req = requests; req < requests + sizeof(requests); req++)
+	for (req = requests; req < requests + sizeof(requests) / sizeof(requests[0]); req++)
 		if (req->cmd == msg->cmd)
 			return req->f(message_data);
 


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