author | Filippo Negroni <fnegroni@flexerasoftware.com> | |
Thu, 25 Feb 2010 10:01:31 +0000 (10:01 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 25 Feb 2010 20:08:22 +0000 (12:08 -0800) | ||
commit | 1f80c2afb0d826567a9a5a1c3ce76c28883e0e96 | |
tree | 9a5a5658f26fbeae32ed47b6c8a94fe3038c0805 | tree | snapshot |
parent | 0606c36a73449e76d8f6133253c1eff291ee8c97 | commit | diff |
Fix gitmkdtemp: correct test for mktemp() return value
In gitmkdtemp, the return value of mktemp is not tested correctly.
mktemp() always returns its 'template' argument, even upon failure.
An error is signalled by making the template an empty string.
Signed-off-by: Filippo Negroni <fnegroni@flexerasoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
In gitmkdtemp, the return value of mktemp is not tested correctly.
mktemp() always returns its 'template' argument, even upon failure.
An error is signalled by making the template an empty string.
Signed-off-by: Filippo Negroni <fnegroni@flexerasoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mkdtemp.c | diff | blob | history |