diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-09 16:02:27 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-09 16:02:27 +0400 |
commit | a8290ec31c89dfdec85fc9d46000c66c0caa1697 (patch) | |
tree | a1fcee6481bc8ef358abdeec12a15fcfd9c53649 /src/filelock.c | |
parent | 27505cf5e4d61283be5368cfd200c942dded0c79 (diff) | |
download | emacs-a8290ec31c89dfdec85fc9d46000c66c0caa1697.tar.gz |
Use make_formatted_string to avoid double length calculation.
* lisp.h (make_formatted_string): New prototype.
* alloc.c (make_formatted_string): New function.
* buffer.c (Fgenerate_new_buffer_name): Use it.
* dbus.c (syms_of_dbusbind): Likewise.
* editfns.c (Fcurrent_time_zone): Likewise.
* filelock.c (get_boot_time): Likewise.
* frame.c (make_terminal_frame, set_term_frame_name)
(x_report_frame_params): Likewise.
* image.c (gs_load): Likewise.
* minibuf.c (get_minibuffer): Likewise.
* msdos.c (dos_set_window_size): Likewise.
* process.c (make_process): Likewise.
* xdisp.c (ensure_echo_area_buffers): Likewise.
* xsettings.c (apply_xft_settings): Likewise.
Diffstat (limited to 'src/filelock.c')
-rw-r--r-- | src/filelock.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/filelock.c b/src/filelock.c index 252ee3cfb1d..30258a5ffa0 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -174,14 +174,14 @@ get_boot_time (void) filename = Qnil; - sprintf (cmd_string, "%s.%d", WTMP_FILE, counter); - tempname = build_string (cmd_string); + tempname = make_formatted_string + (cmd_string, "%s.%d", WTMP_FILE, counter); if (! NILP (Ffile_exists_p (tempname))) filename = tempname; else { - sprintf (cmd_string, "%s.%d.gz", WTMP_FILE, counter); - tempname = build_string (cmd_string); + tempname = make_formatted_string (cmd_string, "%s.%d.gz", + WTMP_FILE, counter); if (! NILP (Ffile_exists_p (tempname))) { Lisp_Object args[6]; |