don't use function-equal in nadvice
[bpt/emacs.git] / src / doprnt.c
index 087256c..3d50724 100644 (file)
@@ -1,7 +1,7 @@
 /* Output like sprintf to a buffer of specified size.
    Also takes args differently: pass one pointer to the end
    of the format string in addition to the format string itself.
-   Copyright (C) 1985, 2001-2013 Free Software Foundation, Inc.
+   Copyright (C) 1985, 2001-2014 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -250,7 +250,7 @@ doprnt (char *buffer, ptrdiff_t bufsize, const char *format,
            {
              if (big_buffer)
                xfree (big_buffer);
-             big_buffer = xmalloc (size_bound);
+             big_buffer = xmalloc_atomic (size_bound);
              sprintf_buffer = big_buffer;
              size_allocated = size_bound;
            }
@@ -361,7 +361,7 @@ doprnt (char *buffer, ptrdiff_t bufsize, const char *format,
 
              /* Copy string into final output, truncating if no room.  */
            doit:
-             eassert (tem >= 0);
+             eassert (0 <= tem);
              /* Coming here means STRING contains ASCII only.  */
              if (STRING_BYTES_BOUND < tem)
                error ("Format width or precision too large");