Code

mingw: do not set errno to 0 on success
authorErik Faye-Lund <kusmabite@gmail.com>
Tue, 23 Nov 2010 19:53:08 +0000 (20:53 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Nov 2010 00:08:01 +0000 (16:08 -0800)
commite93368d26ebcf69698b8454afb85c9c84bd54363
tree5d49188551adc03bf69e0053cb4883d6afee3050
parent1c7d402b3e1e9d7e50abfbfb18c88bc79be468ea
mingw: do not set errno to 0 on success

Currently do_lstat always sets errno to 0 on success. This incorrectly
overwrites previous errors.

Fetch the error-code into a temporary variable instead, and assign that
to errno on failure.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c