[BACK]Return to cond.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.bin / make

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/usr.bin/make/cond.c between version 1.269 and 1.270

version 1.269, 2021/06/21 21:10:01 version 1.270, 2021/07/29 06:35:20
Line 376  TryParseNumber(const char *str, double *
Line 376  TryParseNumber(const char *str, double *
         unsigned long ul_val;          unsigned long ul_val;
         double dbl_val;          double dbl_val;
   
         errno = 0;  
         if (str[0] == '\0') {   /* XXX: why is an empty string a number? */          if (str[0] == '\0') {   /* XXX: why is an empty string a number? */
                 *out_value = 0.0;                  *out_value = 0.0;
                 return true;                  return true;
         }          }
   
           errno = 0;
         ul_val = strtoul(str, &end, str[1] == 'x' ? 16 : 10);          ul_val = strtoul(str, &end, str[1] == 'x' ? 16 : 10);
         if (*end == '\0' && errno != ERANGE) {          if (*end == '\0' && errno != ERANGE) {
                 *out_value = str[0] == '-' ? -(double)-ul_val : (double)ul_val;                  *out_value = str[0] == '-' ? -(double)-ul_val : (double)ul_val;

Legend:
Removed from v.1.269  
changed lines
  Added in v.1.270

CVSweb <webmaster@jp.NetBSD.org>