From: Stephen Hemminger Date: Sat, 26 Dec 2009 18:20:50 +0000 (-0800) Subject: Fix warning about strtod() return value X-Git-Tag: v2.6.31~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=985f4578c6f14bb85100613776c36cecd26e0d2b;p=thirdparty%2Fiproute2.git Fix warning about strtod() return value --- diff --git a/tc/q_netem.c b/tc/q_netem.c index d06932e88..33b3d2a49 100644 --- a/tc/q_netem.c +++ b/tc/q_netem.c @@ -100,8 +100,8 @@ static int get_distribution(const char *type, __s16 *data, int maxdata) static int isnumber(const char *arg) { char *p; - (void) strtod(arg, &p); - return (p != arg); + + return strtod(arg, &p) != 0 || p != arg; } #define NEXT_IS_NUMBER() (NEXT_ARG_OK() && isnumber(argv[1]))