diff options
author | Stefan Weil <weil@mail.berlios.de> | 2011-02-02 01:04:36 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-02 18:00:02 -0500 |
commit | 08b018327c2e8412fd76f821e9bb9de36ef48cb1 (patch) | |
tree | 82a35122e29b5ba6ee4b0876e8eaaf889760c6b3 /drivers/s390 | |
parent | 5df979d6922d50cc12bfbe83721c143a5d0d31b7 (diff) |
s390: Fix possibly wrong size in strncmp (smsgiucv)
This error was reported by cppcheck:
drivers/s390/net/smsgiucv.c:63: error: Using sizeof for array given as
function argument returns the size of pointer.
Although there is no runtime problem as long as sizeof(u8 *) == 8,
this misleading code should get fixed.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/smsgiucv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c index 65e1cf104943..207b7d742443 100644 --- a/drivers/s390/net/smsgiucv.c +++ b/drivers/s390/net/smsgiucv.c | |||
@@ -60,7 +60,7 @@ static struct iucv_handler smsg_handler = { | |||
60 | static int smsg_path_pending(struct iucv_path *path, u8 ipvmid[8], | 60 | static int smsg_path_pending(struct iucv_path *path, u8 ipvmid[8], |
61 | u8 ipuser[16]) | 61 | u8 ipuser[16]) |
62 | { | 62 | { |
63 | if (strncmp(ipvmid, "*MSG ", sizeof(ipvmid)) != 0) | 63 | if (strncmp(ipvmid, "*MSG ", 8) != 0) |
64 | return -EINVAL; | 64 | return -EINVAL; |
65 | /* Path pending from *MSG. */ | 65 | /* Path pending from *MSG. */ |
66 | return iucv_path_accept(path, &smsg_handler, "SMSGIUCV ", NULL); | 66 | return iucv_path_accept(path, &smsg_handler, "SMSGIUCV ", NULL); |