Re: [PATCH] lib/kstrtox.c clean kstrtoll function

From: Jeff Epler
Date: Sat Jan 24 2015 - 14:30:44 EST



On Fri, Jan 23, 2015 at 06:55:36PM +0530, Anshul Garg wrote:
> if (((long long)tmp < LLONG_MIN) || ((long long)tmp > LLONG_MAX) )
> + return -ERANGE;

This proposed code is still wrong (-ERANGE can never be returned by this
statement). It may be best to leave the code alone, rather than propose
more untested alternatives.

Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/