aboutsummaryrefslogtreecommitdiff
path: root/pack-write.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 /pack-write.c
parentf21a47b27ceef8ff2f6f218d5b7266d5fd9e2e93 (diff)
downloadgit-7647b17f1d7a98362f8bdbe48b30d94ed655229c.tar.gz
git-7647b17f1d7a98362f8bdbe48b30d94ed655229c.tar.xz
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 'pack-write.c')
-rw-r--r--pack-write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-write.c b/pack-write.c
index 1cf5f7c9f..e59b197e5 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -45,7 +45,7 @@ const char *write_idx_file(const char *index_name, struct pack_idx_entry **objec
static char tmpfile[PATH_MAX];
snprintf(tmpfile, sizeof(tmpfile),
"%s/tmp_idx_XXXXXX", get_object_directory());
- fd = mkstemp(tmpfile);
+ fd = xmkstemp(tmpfile);
index_name = xstrdup(tmpfile);
} else {
unlink(index_name);