git_mkstemps_mode: don't set errno to EINVAL on exit.
authorMatthieu Moy <Matthieu.Moy@imag.fr>
Mon, 22 Feb 2010 22:32:15 +0000 (23:32 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Feb 2010 23:24:46 +0000 (15:24 -0800)
commit1d9740cb324f7f5d798ecfc259dc213b244ad9b7
tree1309b7e6d7b38cfc0d5fb0199905eee59d7a4e3c
parentf80c7ae8fe9c0f3ce93c96a2dccaba34e456e33a
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 <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
path.c