The following commit has been merged in the master branch:
commit bc68b3461b939c4104d790ec3246a976fe4d52b3
Author: Guillem Jover <[email protected]>
Date: Tue Jul 6 08:49:09 2010 +0200
dpkg-deb: Remove redundant readfromfd variable
This variable always gets assigned the same fd, so there's no point in
keeping it around.
diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c
index bf60170..f290ce5 100644
--- a/dpkg-deb/extract.c
+++ b/dpkg-deb/extract.c
@@ -124,7 +124,7 @@ void extracthalf(const char *debar, const char *directory,
char nlc;
char *cur;
struct ar_hdr arh;
- int readfromfd, adminmember;
+ int adminmember;
bool oldformat, header_done;
struct compressor *decompressor = &compressor_gzip;
@@ -262,18 +262,17 @@ void extracthalf(const char *debar, const char *directory,
exit(0);
}
close(p1[1]);
- readfromfd = p1[0];
if (taroption) m_pipe(p2);
c2 = subproc_fork();
if (!c2) {
- m_dup2(readfromfd,0);
+ m_dup2(p1[0], 0);
if (admininfo) close(p1[0]);
if (taroption) { m_dup2(p2[1],1); close(p2[0]); close(p2[1]); }
decompress_filter(decompressor, 0, 1, _("data"));
}
- if (readfromfd != fileno(ar)) close(readfromfd);
+ close(p1[0]);
fclose(ar);
if (taroption) close(p2[1]);
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]