diff options
author | Michael Vogt <mvo@debian.org> | 2013-07-25 20:22:43 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-07-25 20:22:43 +0200 |
commit | fe0036dd7e3bbd808fa526e2e142fdb89105caae (patch) | |
tree | a31ad68247f53bd5e4b2f68e87430ad93e04ebed /apt-pkg/contrib | |
parent | c104200045ef19f5ee061c4a00b468482ac65dc4 (diff) |
rework the code in cdromutl.cc to make coverity (more) happy
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/cdromutl.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc index 187f6bd59..afa01a562 100644 --- a/apt-pkg/contrib/cdromutl.cc +++ b/apt-pkg/contrib/cdromutl.cc @@ -122,8 +122,9 @@ bool MountCdrom(string Path, string DeviceName) if (Child == 0) { // Make all the fds /dev/null + int null_fd = open("/dev/null",O_RDWR); for (int I = 0; I != 3; I++) - dup2(open("/dev/null",O_RDWR),I); + dup2(null_fd, I); if (_config->Exists("Acquire::cdrom::"+Path+"::Mount") == true) { |