Fix brown-bag error.
[pintos-anon] / src / lib / stdio.c
index 13df2c7703fb47defa6fd3d9d0b9f71605961879..bae257feb73da6bc4e64806feaaeca2488cbd76f 100644 (file)
@@ -492,8 +492,6 @@ format_integer (uintmax_t value, bool negative, const struct integer_base *b,
      If requested precision is 0, then a value of zero is
      rendered as a null string, otherwise as "0". */
   precision = c->precision < 0 ? 1 : c->precision;
-  if (precision < 0)
-    precision = 1;
   while (cp - buf < precision && cp - buf < (int) sizeof buf - 8)
     *cp++ = '0';
 
@@ -562,9 +560,10 @@ __printf (const char *format,
 }
 \f
 /* Dumps the SIZE bytes in BUF to the console as hex bytes
-   arranged 16 per line, plus offsets listed starting at OFS for
-   the first byte in BU.  If ASCII is true then the corresponding
-   ASCII characters are also rendered alongside. */   
+   arranged 16 per line.  Numeric offsets are also included,
+   starting at OFS for the first byte in BUF.  If ASCII is true
+   then the corresponding ASCII characters are also rendered
+   alongside. */   
 void
 hex_dump (uintptr_t ofs, const void *buf_, size_t size, bool ascii)
 {