[devel] [PATCH for apt 19/38] Don't use uninitialized value

Aleksei Nikiforov darktemplar на altlinux.org
Вт Дек 10 18:23:24 MSK 2019


Found via clang-static-analyzer
---
 apt/apt-pkg/rpm/rpmpm.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apt/apt-pkg/rpm/rpmpm.cc b/apt/apt-pkg/rpm/rpmpm.cc
index eb14363..a6a3837 100644
--- a/apt/apt-pkg/rpm/rpmpm.cc
+++ b/apt/apt-pkg/rpm/rpmpm.cc
@@ -625,7 +625,7 @@ bool pkgRPMExtPM::ExecRPM(Item::RPMOps op, const std::vector<apt_item> &files)
       if (_config->FindB("RPM::FlushSTDIN",true) == true)
       {
 	 int Flags,dummy;
-	 if ((Flags = fcntl(STDIN_FILENO,F_GETFL,dummy)) < 0)
+	 if ((Flags = fcntl(STDIN_FILENO,F_GETFL)) < 0)
 	     _exit(100);
 	 
 	 // Discard everything in stdin before forking dpkg
-- 
2.24.0



Подробная информация о списке рассылки Devel