summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/error.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2010-07-12 13:26:10 +0200
committerMichael Vogt <mvo@debian.org>2010-07-12 13:26:10 +0200
commit2a679f4f71784800b6643b5c4eecb4b11865a439 (patch)
treec8b5f2967f09a3001becf5fb6ff634d933e171a2 /apt-pkg/contrib/error.cc
parent137a73dc58b14f71a11da5940e099725f6dad8ef (diff)
parentd10cef824604012516f26efaae8bab1f29a7820a (diff)
merged from lp:~donkult/apt/sid
Diffstat (limited to 'apt-pkg/contrib/error.cc')
-rw-r--r--apt-pkg/contrib/error.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/apt-pkg/contrib/error.cc b/apt-pkg/contrib/error.cc
index 8cee21c9c..fbb6e4636 100644
--- a/apt-pkg/contrib/error.cc
+++ b/apt-pkg/contrib/error.cc
@@ -94,11 +94,10 @@ bool GlobalError::DebugE(const char *Function,const char *Description,...) {
/*}}}*/
// GlobalError::InsertErrno - formats an error message with the errno /*{{{*/
bool GlobalError::InsertErrno(MsgType type, const char* Function,
- const char* Description, va_list const &args) {
+ const char* Description, va_list &args) {
char S[400];
- vsnprintf(S,sizeof(S),Description,args);
- snprintf(S + strlen(S),sizeof(S) - strlen(S),
- " - %s (%i: %s)", Function, errno, strerror(errno));
+ snprintf(S, sizeof(S), "%s - %s (%i: %s)", Description,
+ Function, errno, strerror(errno));
return Insert(type, S, args);
}
/*}}}*/
@@ -141,7 +140,7 @@ bool GlobalError::Debug(const char *Description,...)
/*}}}*/
// GlobalError::Insert - Insert a new item at the end /*{{{*/
bool GlobalError::Insert(MsgType type, const char* Description,
- va_list const &args) {
+ va_list &args) {
char S[400];
vsnprintf(S,sizeof(S),Description,args);