The following commit has been merged in the master branch:
commit df863c9b8ddf377b6cb89ac9079770356bd69c65
Author: Guillem Jover <[email protected]>
Date: Tue Jul 6 08:42:13 2010 +0200
dpkg-deb: Do not use EOF on file descriptor calls
The code was working because EOF is usually -1, but that's not
guaranteed by any standard. It's also conceptually wrong to mix this
definition from stream based I/O on file dscriptor based I/O.
For the close() call, just check that the return value is not 0.
Regression introduced in f4f4a1aa8dec678b6f34abcbcb8efd5b75966028.
diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c
index e745191..bf60170 100644
--- a/dpkg-deb/extract.c
+++ b/dpkg-deb/extract.c
@@ -257,7 +257,7 @@ void extracthalf(const char *debar, const char *directory,
if (!c1) {
close(p1[0]);
stream_fd_copy(ar, p1[1], memberlen, _("failed to write to pipe in copy"));
- if (close(p1[1]) == EOF)
+ if (close(p1[1]))
ohshite(_("failed to close pipe in copy"));
exit(0);
}
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]