aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2011-02-02 01:04:35 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-02 18:00:02 -0500
commit5df979d6922d50cc12bfbe83721c143a5d0d31b7 (patch)
tree65172ec53434369e1d8c0be88ae430833e2d4d84 /drivers/s390
parentd0ff1f52361d714863c49abb721a8714ea4e76d6 (diff)
s390: Fix wrong size in memcmp (netiucv)
This error was reported by cppcheck: drivers/s390/net/netiucv.c:568: error: Using sizeof for array given as function argument returns the size of pointer. sizeof(ipuser) did not result in 16 (as many programmers would have expected) but sizeof(u8 *), so it is 4 or 8, too small here. 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/netiucv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index 65ebee0a3266..b6a6356d09b3 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -565,7 +565,7 @@ static int netiucv_callback_connreq(struct iucv_path *path,
565 struct iucv_event ev; 565 struct iucv_event ev;
566 int rc; 566 int rc;
567 567
568 if (memcmp(iucvMagic, ipuser, sizeof(ipuser))) 568 if (memcmp(iucvMagic, ipuser, 16))
569 /* ipuser must match iucvMagic. */ 569 /* ipuser must match iucvMagic. */
570 return -EINVAL; 570 return -EINVAL;
571 rc = -EINVAL; 571 rc = -EINVAL;