Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>2007-08-14 23:45:58 +0400
committerJunio C Hamano <gitster@pobox.com>2007-08-15 09:20:26 +0400
commit7647b17f1d7a98362f8bdbe48b30d94ed655229c (patch)
treecf0ec675b95439b5abec90cdc1e9853d61b4dfb4 /index-pack.c
parentf21a47b27ceef8ff2f6f218d5b7266d5fd9e2e93 (diff)
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 'index-pack.c')
-rw-r--r--index-pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/index-pack.c b/index-pack.c
index 8403c36b63..db58e05041 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -114,7 +114,7 @@ static const char *open_pack_file(const char *pack_name)
static char tmpfile[PATH_MAX];
snprintf(tmpfile, sizeof(tmpfile),
"%s/tmp_pack_XXXXXX", get_object_directory());
- output_fd = mkstemp(tmpfile);
+ output_fd = xmkstemp(tmpfile);
pack_name = xstrdup(tmpfile);
} else
output_fd = open(pack_name, O_CREAT|O_EXCL|O_RDWR, 0600);