Caught by gcc -Werror=unused-but-set-variable.
* lib/fclose.c (rpl_fclose): Don't lose fflush errors.
Reported by Jim Meyering.
Signed-off-by: Eric Blake <eblake@redhat.com>
2011-05-11 Eric Blake <eblake@redhat.com>
+ fclose: preserve fflush errors
+ * lib/fclose.c (rpl_fclose): Don't lose fflush errors.
+ Reported by Jim Meyering.
+
bootstrap: support a prereq of 'rpcgen -' on RHEL5
* build-aux/bootstrap (check_versions): When no specific version
is required, merely check that the app produces an exit status
fclose (fp); /* will fail with errno = EBADF, if we did not lose a race */
- if (saved_errno != 0)
- {
- errno = saved_errno;
- result = EOF;
- }
-
#else /* !WINDOWS_SOCKETS */
/* Call fclose() and invoke all hooks of the overridden close(). */
#endif /* !WINDOWS_SOCKETS */
+ if (saved_errno != 0)
+ {
+ errno = saved_errno;
+ result = EOF;
+ }
+
return result;
}