summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-method.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-08-11 18:42:19 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-08-11 18:42:19 +0200
commitb40b7c380acbdcd84338bdcd253df32f1ef79ed8 (patch)
tree6d05ff3245c94350618aa6562b3d4a2497db78c0 /apt-pkg/acquire-method.cc
parentb1660aa192ff24747ac247805eda47b84a9cf933 (diff)
cppcheck is right that the check for preventing null deference of Query
is redundant in Redirect() as we can't reach the code with null anyway [apt-pkg/acquire-method.cc:433]: (error) Possible null pointer dereference: Queue - otherwise it is redundant to check if Queue is null at line 425
Diffstat (limited to 'apt-pkg/acquire-method.cc')
-rw-r--r--apt-pkg/acquire-method.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc
index e9e102488..79a7519a8 100644
--- a/apt-pkg/acquire-method.cc
+++ b/apt-pkg/acquire-method.cc
@@ -421,12 +421,8 @@ void pkgAcqMethod::Status(const char *Format,...)
to keep the pipeline synchronized. */
void pkgAcqMethod::Redirect(const string &NewURI)
{
- std::cout << "103 Redirect\nURI: ";
- if (Queue != 0)
- std::cout << Queue->Uri << "\n";
- else
- std::cout << "<UNKNOWN>\n";
- std::cout << "New-URI: " << NewURI << "\n"
+ std::cout << "103 Redirect\nURI: " << Queue->Uri << "\n"
+ << "New-URI: " << NewURI << "\n"
<< "\n" << std::flush;
// Change the URI for the request.