Commit 985f4578 authored by Stephen Hemminger's avatar Stephen Hemminger

Fix warning about strtod() return value

parent b49240ec
......@@ -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]))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment