From 6ebff74ad242d4c56fb7762965b19cee14fd2daa Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 25 Nov 2006 18:10:49 +0100 Subject: [PATCH] Use m_tempfile and better errors msg Signed-off-by: Julien Danjou Signed-off-by: Pierre Habouzit --- lib-crypt/pgpmicalg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib-crypt/pgpmicalg.c b/lib-crypt/pgpmicalg.c index c30ae75..4e5e836 100644 --- a/lib-crypt/pgpmicalg.c +++ b/lib-crypt/pgpmicalg.c @@ -137,15 +137,15 @@ static short pgp_find_hash (const char *fname) short rv = -1; - mutt_mktemp (tempfile); - if ((out = safe_fopen (tempfile, "w+")) == NULL) { - mutt_perror (tempfile); + out = m_tempfile (tempfile, sizeof(tempfile), NONULL(Tempdir), NULL); + if (!out) { + mutt_perror (_("Can't create temporary file")); goto bye; } unlink (tempfile); if ((in = fopen (fname, "r")) == NULL) { - mutt_perror (fname); + mutt_perror (_("Can't create temporary file")); goto bye; } -- 2.20.1