]> sjero.net Git - wget/blobdiff - src/snprintf.c
[svn] Fixes for recursive spider mode.
[wget] / src / snprintf.c
index b8e28f54fea84fbd6603e27c6eb13d17235ce28d..057ccc2740362842a6967a586e16b9772faafa8a 100644 (file)
@@ -485,7 +485,8 @@ static int fmtstr (char *buffer, size_t *currlen, size_t maxlen,
   else
     /* When precision is specified, don't read VALUE past precision. */
     /*strln = strnlen (value, max);*/
-    for (strln = 0; strln < max && value[strln]; ++strln);
+    for (strln = 0; strln < max && value[strln]; ++strln)
+      ;
   padlen = min - strln;
   if (padlen < 0) 
     padlen = 0;
@@ -617,7 +618,7 @@ static LDOUBLE abs_val (LDOUBLE value)
   return result;
 }
 
-static LDOUBLE pow10 (int exp)
+static LDOUBLE pow10_int (int exp)
 {
   LDOUBLE result = 1;
 
@@ -630,7 +631,7 @@ static LDOUBLE pow10 (int exp)
   return result;
 }
 
-static LLONG round (LDOUBLE value)
+static LLONG round_int (LDOUBLE value)
 {
   LLONG intpart;
 
@@ -728,12 +729,12 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
     max = MAX_DIGITS;
 
   /* Factor of 10 with the needed number of digits, e.g. 1000 for max==3 */
-  mask10 = pow10 (max);
+  mask10 = pow10_int (max);
 
   /* We "cheat" by converting the fractional part to integer by
    * multiplying by a factor of 10
    */
-  fracpart = round (mask10 * (ufvalue - intpart));
+  fracpart = round_int (mask10 * (ufvalue - intpart));
 
   if (fracpart >= mask10)
   {