mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
(decode_num): simplify expression.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru> Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
parent
773bb6f60b
commit
f4740bf0b9
@ -257,7 +257,7 @@ decode_num (uintmax_t *num, const char *arg, uintmax_t maxval)
|
||||
gboolean overflow;
|
||||
|
||||
*num = stoint (arg, &arg_lim, &overflow, 0, maxval);
|
||||
return (((arg_lim == arg ? 1 : 0) | (*arg_lim != '\0') | (overflow ? 1 : 0)) == 0);
|
||||
return !(arg_lim == arg || *arg_lim != '\0' || overflow);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user