From 69c2ecbdc937e3c73fe67d3c9bce12a80d3ec7ec Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 10 Mar 2013 12:24:13 +0100 Subject: various simple changes to fix cppcheck warnings --- apt-pkg/aptconfiguration.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/aptconfiguration.cc') diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 653775688..37c846582 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -401,8 +401,8 @@ std::vector const Configuration::getArchitectures(bool const &Cache close(external[1]); FILE *dpkg = fdopen(external[0], "r"); - char buf[1024]; if(dpkg != NULL) { + char buf[1024]; while (fgets(buf, sizeof(buf), dpkg) != NULL) { char* arch = strtok(buf, " "); while (arch != NULL) { -- cgit v1.2.3