summaryrefslogtreecommitdiff
path: root/lib-src/movemail.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-08-28 16:57:19 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-08-28 16:57:19 -0700
commit644a0faa36ad8c1e251d198c2bc69f17c8bdb83a (patch)
tree2f241eb29829d1e533a1bdfb3b07c37ea95119b1 /lib-src/movemail.c
parent9250f758254937f43a621a2371e3433ce7daa573 (diff)
downloademacs-644a0faa36ad8c1e251d198c2bc69f17c8bdb83a.tar.gz
emacs-644a0faa36ad8c1e251d198c2bc69f17c8bdb83a.tar.bz2
emacs-644a0faa36ad8c1e251d198c2bc69f17c8bdb83a.zip
* movemail.c (main): Do not use sprintf when its result might not fit
in 'int'. Instead, put the possibly-long file name into the output of pfatal_with_name.
Diffstat (limited to 'lib-src/movemail.c')
-rw-r--r--lib-src/movemail.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index d70c655adec..097bf23c202 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -325,11 +325,10 @@ main (int argc, char **argv)
if (desc < 0)
{
int mkstemp_errno = errno;
- char *message = (char *) xmalloc (strlen (tempname) + 50);
- sprintf (message, "creating %s, which would become the lock file",
- tempname);
+ error ("error while creating what would become the lock file",
+ 0, 0);
errno = mkstemp_errno;
- pfatal_with_name (message);
+ pfatal_with_name (tempname);
}
close (desc);