diff options
author | David Kalnischkies <david@kalnischkies.de> | 2017-12-13 12:17:25 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2017-12-13 23:53:02 +0100 |
commit | bb3a0325bf6b5c6c7cd076ba8a44d9d3eba0902b (patch) | |
tree | e23d093d143cb6c13ff8077c236a38a080badec1 /apt-pkg/contrib/netrc.cc | |
parent | d30b30ad1e1ce434df84e15e2573c43ac152f9e3 (diff) |
explicitly name token in auth.conf parsing error
Reported-By: gcc -Wsign-promo
Diffstat (limited to 'apt-pkg/contrib/netrc.cc')
-rw-r--r-- | apt-pkg/contrib/netrc.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/apt-pkg/contrib/netrc.cc b/apt-pkg/contrib/netrc.cc index 27511d413..ed8b2aa88 100644 --- a/apt-pkg/contrib/netrc.cc +++ b/apt-pkg/contrib/netrc.cc @@ -127,8 +127,18 @@ bool MaybeAddAuth(FileFd &NetRCFile, URI &Uri) return true; } else if (Debug) - std::clog << "MaybeAddAuth: Found no matching host (syntax error: " << active_token << ") for " - << (std::string)Uri << " from " << NetRCFile.Name() << std::endl; + { + std::clog << "MaybeAddAuth: Found no matching host (syntax error: token:"; + switch (active_token) + { + case NO: std::clog << "NO"; break; + case MACHINE: std::clog << "MACHINE"; break; + case GOOD_MACHINE: std::clog << "GOOD_MACHINE"; break; + case LOGIN: std::clog << "LOGIN"; break; + case PASSWORD: std::clog << "PASSWORD"; break; + } + std::clog << ") for " << (std::string)Uri << " from " << NetRCFile.Name() << std::endl; + } return false; } |