mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
linux: spl: generic: ddi_strtou##type: elide unused flag
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13434
This commit is contained in:
parent
c25b281378
commit
354a1bfb8e
@ -436,7 +436,7 @@ __VA_ARGS__ int ddi_strtou##type(const char *str, char **endptr, \
|
||||
{ \
|
||||
valtype last_value, value = 0; \
|
||||
char *ptr = (char *)str; \
|
||||
int flag = 1, digit; \
|
||||
int digit; \
|
||||
\
|
||||
if (strlen(ptr) == 0) \
|
||||
return (EINVAL); \
|
||||
@ -474,15 +474,13 @@ __VA_ARGS__ int ddi_strtou##type(const char *str, char **endptr, \
|
||||
if (last_value > value) /* Overflow */ \
|
||||
return (ERANGE); \
|
||||
\
|
||||
flag = 1; \
|
||||
ptr++; \
|
||||
} \
|
||||
\
|
||||
if (flag) \
|
||||
*result = value; \
|
||||
*result = value; \
|
||||
\
|
||||
if (endptr) \
|
||||
*endptr = (char *)(flag ? ptr : str); \
|
||||
*endptr = ptr; \
|
||||
\
|
||||
return (0); \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user