mirror of
https://github.com/git/git.git
synced 2026-03-13 18:33:25 +01:00
Don't make the extra check for errno == EINVAL MinGW specific.
This saves an #ifdef. There is precedent for an extra check without #ifdef brackets already in refs.c (Solaris). The check for EINVAL shouldn't hurt. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
@@ -34,16 +34,12 @@ void maybe_flush_or_die(FILE *f, const char *desc)
|
||||
return;
|
||||
}
|
||||
if (fflush(f)) {
|
||||
#ifndef __MINGW32__
|
||||
if (errno == EPIPE)
|
||||
#else
|
||||
/*
|
||||
* On Windows, EPIPE is returned only by the first write()
|
||||
* after the reading end has closed its handle; subsequent
|
||||
* write()s return EINVAL.
|
||||
*/
|
||||
if (errno == EPIPE || errno == EINVAL)
|
||||
#endif
|
||||
exit(0);
|
||||
die("write failure on %s: %s", desc, strerror(errno));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user