path: root/path.c
diff options
authorMatthieu Moy <>2010-02-22 22:32:15 (GMT)
committerJunio C Hamano <>2010-02-22 23:24:46 (GMT)
commit1d9740cb324f7f5d798ecfc259dc213b244ad9b7 (patch)
tree1309b7e6d7b38cfc0d5fb0199905eee59d7a4e3c /path.c
parentf80c7ae8fe9c0f3ce93c96a2dccaba34e456e33a (diff)
git_mkstemps_mode: don't set errno to EINVAL on exit.
When reaching the end of git_mkstemps_mode, at least one call to open() has been done, and errno has been set accordingly. Setting errno is therefore not necessary, and actually harmfull since callers can't distinguish e.g. permanent failure from ENOENT, which can just mean that we need to create the containing directory. Signed-off-by: Matthieu Moy <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'path.c')
1 files changed, 0 insertions, 1 deletions
diff --git a/path.c b/path.c
index 03d284b..12ef731 100644
--- a/path.c
+++ b/path.c
@@ -222,7 +222,6 @@ int git_mkstemps_mode(char *pattern, int suffix_len, int mode)
/* We return the null string if we can't find a unique file name. */
pattern[0] = '\0';
- errno = EINVAL;
return -1;