From 9678770074e48ba947e69d9a9f2ef9688688c07f Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 23 Oct 2013 19:58:27 +0200 Subject: python/policy.cc: (scan-build): Fix a dead assignment We need to use else if, otherwise the first cases are not handled at all. --- python/policy.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/policy.cc b/python/policy.cc index ac9a1ace..0ace3e67 100644 --- a/python/policy.cc +++ b/python/policy.cc @@ -134,9 +134,9 @@ static PyObject *policy_create_pin(PyObject *self, PyObject *args) { pkgPolicy *policy = GetCpp(self); if (strcmp(type,"Version") == 0 || strcmp(type, "version") == 0) match_type = pkgVersionMatch::Version; - if (strcmp(type,"Release") == 0 || strcmp(type, "release") == 0) + else if (strcmp(type,"Release") == 0 || strcmp(type, "release") == 0) match_type = pkgVersionMatch::Release; - if (strcmp(type,"Origin") == 0 || strcmp(type, "origin") == 0) + else if (strcmp(type,"Origin") == 0 || strcmp(type, "origin") == 0) match_type = pkgVersionMatch::Origin; else match_type = pkgVersionMatch::None; -- cgit v1.2.3