1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-30 00:51:50 -08:00

* buffer.c (Fgenerate_new_buffer_name): Use EMACS_INT for count, not int.

This commit is contained in:
Paul Eggert 2011-06-08 17:40:43 -07:00
parent e762cafe71
commit 666398f371
2 changed files with 5 additions and 3 deletions

View file

@ -1,5 +1,7 @@
2011-06-09 Paul Eggert <eggert@cs.ucla.edu>
* buffer.c (Fgenerate_new_buffer_name): Use EMACS_INT for count, not int.
* data.c (Qcompiled_function): Now static.
2011-06-08 Paul Eggert <eggert@cs.ucla.edu>

View file

@ -841,8 +841,8 @@ it is in the sequence to be tried) even if a buffer with that name exists. */)
(register Lisp_Object name, Lisp_Object ignore)
{
register Lisp_Object gentemp, tem;
int count;
char number[10];
EMACS_INT count;
char number[INT_BUFSIZE_BOUND (EMACS_INT) + sizeof "<>"];
CHECK_STRING (name);
@ -856,7 +856,7 @@ it is in the sequence to be tried) even if a buffer with that name exists. */)
count = 1;
while (1)
{
sprintf (number, "<%d>", ++count);
sprintf (number, "<%"pI"d>", ++count);
gentemp = concat2 (name, build_string (number));
tem = Fstring_equal (gentemp, ignore);
if (!NILP (tem))