Merge branch 'master' into net-next
This commit is contained in:
commit
d250da9c68
|
|
@ -970,21 +970,18 @@ int hex2mem(const char *buf, uint8_t *mem, int count)
|
||||||
for (i = 0, j = 0; i < count; i++, j += 2) {
|
for (i = 0, j = 0; i < count; i++, j += 2) {
|
||||||
c = get_hex(buf[j]);
|
c = get_hex(buf[j]);
|
||||||
if (c < 0)
|
if (c < 0)
|
||||||
goto err;
|
return -1;
|
||||||
|
|
||||||
mem[i] = c << 4;
|
mem[i] = c << 4;
|
||||||
|
|
||||||
c = get_hex(buf[j + 1]);
|
c = get_hex(buf[j + 1]);
|
||||||
if (c < 0)
|
if (c < 0)
|
||||||
goto err;
|
return -1;
|
||||||
|
|
||||||
mem[i] |= c;
|
mem[i] |= c;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err:
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int addr64_n2a(__u64 addr, char *buff, size_t len)
|
int addr64_n2a(__u64 addr, char *buff, size_t len)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue