X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fkstrtox.c;fp=lib%2Fkstrtox.c;h=a235f3cc471c6d427fd4c2e713a701fa0b1e7e1b;hb=78be959e38567f0e020848179a5d64d2b064391a;hp=05672e819f8c4c9164dd40e3752d23b8b5f63577;hpb=01eda2e0c0cf035308308a19581e4979285b51ec;p=pandora-kernel.git diff --git a/lib/kstrtox.c b/lib/kstrtox.c index 05672e819f8c..a235f3cc471c 100644 --- a/lib/kstrtox.c +++ b/lib/kstrtox.c @@ -49,12 +49,9 @@ static int _kstrtoull(const char *s, unsigned int base, unsigned long long *res) val = *s - '0'; else if ('a' <= _tolower(*s) && _tolower(*s) <= 'f') val = _tolower(*s) - 'a' + 10; - else if (*s == '\n') { - if (*(s + 1) == '\0') - break; - else - return -EINVAL; - } else + else if (*s == '\n' && *(s + 1) == '\0') + break; + else return -EINVAL; if (val >= base)