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>
This commit is contained in:
parent
d0ff1f5236
commit
5df979d692
@ -565,7 +565,7 @@ static int netiucv_callback_connreq(struct iucv_path *path,
|
||||
struct iucv_event ev;
|
||||
int rc;
|
||||
|
||||
if (memcmp(iucvMagic, ipuser, sizeof(ipuser)))
|
||||
if (memcmp(iucvMagic, ipuser, 16))
|
||||
/* ipuser must match iucvMagic. */
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user