From 6f312c89578be7b8d0a47c75a4de4cc8c190e40e Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Wed, 29 Feb 2012 15:54:24 +0100 Subject: xalloc: use xasprintf in all files Signed-off-by: Sami Kerola --- lib/fileutils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/fileutils.c') diff --git a/lib/fileutils.c b/lib/fileutils.c index ed97967a3..819298935 100644 --- a/lib/fileutils.c +++ b/lib/fileutils.c @@ -9,6 +9,7 @@ #include "c.h" #include "pathnames.h" +#include "xalloc.h" /* Create open temporary file in safe way. Please notice that the * file permissions are -rw------- by default. */ @@ -22,10 +23,10 @@ FILE *xmkstemp(char **tmpname) tmpenv = getenv("TMPDIR"); if (tmpenv) - asprintf(&localtmp, "%s/%s.XXXXXX", tmpenv, + xasprintf(&localtmp, "%s/%s.XXXXXX", tmpenv, program_invocation_short_name); else - asprintf(&localtmp, "%s/%s.XXXXXX", _PATH_TMP, + xasprintf(&localtmp, "%s/%s.XXXXXX", _PATH_TMP, program_invocation_short_name); old_mode = umask(077); fd = mkstemp(localtmp); -- cgit v1.2.3-55-g7522