summaryrefslogtreecommitdiff
path: root/dpkg-deb/extract.c
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2010-07-06 08:49:09 +0200
committerGuillem Jover <guillem@debian.org>2010-07-08 11:10:01 +0200
commitbc68b3461b939c4104d790ec3246a976fe4d52b3 (patch)
tree02180cf90ad74941073afa57922ffc4bb8ff6689 /dpkg-deb/extract.c
parentdf863c9b8ddf377b6cb89ac9079770356bd69c65 (diff)
downloaddpkg-bc68b3461b939c4104d790ec3246a976fe4d52b3.tar.gz
dpkg-deb: Remove redundant readfromfd variable
This variable always gets assigned the same fd, so there's no point in keeping it around.
Diffstat (limited to 'dpkg-deb/extract.c')
-rw-r--r--dpkg-deb/extract.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c
index bf60170b0..f290ce59d 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]);