mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
atm: zatm: fix memcmp casting
memcmp() returns int, but eprom_try_esi() cast it to unsigned char. One can lose significant bits and get 0 from non-0 value returned by the memcmp(). Signed-off-by: Ivan Bornyakov <brnkv.i1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3125642695
commit
f9c6442a8f
1 changed files with 2 additions and 2 deletions
|
@ -1151,8 +1151,8 @@ static void eprom_get_byte(struct zatm_dev *zatm_dev, unsigned char *byte,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static unsigned char eprom_try_esi(struct atm_dev *dev, unsigned short cmd,
|
static int eprom_try_esi(struct atm_dev *dev, unsigned short cmd, int offset,
|
||||||
int offset, int swap)
|
int swap)
|
||||||
{
|
{
|
||||||
unsigned char buf[ZEPROM_SIZE];
|
unsigned char buf[ZEPROM_SIZE];
|
||||||
struct zatm_dev *zatm_dev;
|
struct zatm_dev *zatm_dev;
|
||||||
|
|
Loading…
Add table
Reference in a new issue