pow = 1;
else if (!strcmp("%", c)) {
*percent = 1;
+ free(c);
return ret;
}
/*
* Convert string into a floating number. Return 1 for success and 0 otherwise.
*/
-int str_to_float(const char *str, double *val)
+static int str_to_float(const char *str, double *val)
{
return (1 == sscanf(str, "%lf", val));
}