summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>2007-08-14 16:45:58 -0300
committerJunio C Hamano <gitster@pobox.com>2007-08-14 22:20:26 -0700
commit7647b17f1d7a98362f8bdbe48b30d94ed655229c (patch)
treecf0ec675b95439b5abec90cdc1e9853d61b4dfb4 /merge-recursive.c
parentf21a47b27ceef8ff2f6f218d5b7266d5fd9e2e93 (diff)
downloadgit-7647b17f1d7a98362f8bdbe48b30d94ed655229c.tar.gz
Use xmkstemp() instead of mkstemp()
xmkstemp() performs error checking and prints a standard error message when an error occur. Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 5326d7c97a..16f6a0f98b 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -782,9 +782,7 @@ static void create_temp(mmfile_t *src, char *path)
int fd;
strcpy(path, ".merge_file_XXXXXX");
- fd = mkstemp(path);
- if (fd < 0)
- die("unable to create temp-file");
+ fd = xmkstemp(path);
if (write_in_full(fd, src->ptr, src->size) != src->size)
die("unable to write temp-file");
close(fd);