Syscall handler doesn't expect to see return address on stack,
[pintos-anon] / src / lib / stdio.c
index 6a03f5388966260d375fc7c77b975986f9c0713e..d223d1065a61ca2f6df986bc219aad0b48f0afdd 100644 (file)
@@ -293,14 +293,11 @@ __vprintf (const char *format, va_list args,
         case 'p':
           {
             /* Pointer conversion.
-               Format non-null pointers as %#x. */
+               Format pointers as %#x. */
             void *p = va_arg (args, void *);
 
             c.flags = POUND;
-            if (p != NULL) 
-              format_integer ((uintptr_t) p, false, &base_x, &c, output, aux);
-            else
-              format_string ("(nil)", 5, &c, output, aux); 
+            format_integer ((uintptr_t) p, false, &base_x, &c, output, aux);
           }
           break;
       
@@ -555,17 +552,6 @@ __printf (const char *format,
   __vprintf (format, args, output, aux);
   va_end (args);
 }
-
-/* Writes string S to the console, followed by a new-line
-   character. */
-int
-puts (const char *s) 
-{
-  while (*s != '\0')
-    putchar (*s++);
-  putchar ('\n');
-  return 0;
-}
 \f
 /* Dumps the SIZE bytes in BUFFER to the console as hex bytes
    arranged 16 per line.  If ASCII is true then the corresponding