diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-07-10 13:51:47 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-07-10 13:51:47 +0200 |
commit | 3c0929ecbeab50de9d38edc2eaebe92aeee65baf (patch) | |
tree | 0a7e3febb19cb925df51fe653feb20a1aeafbaf5 /apt-pkg/contrib | |
parent | 137a73dc58b14f71a11da5940e099725f6dad8ef (diff) |
* apt-pkg/contrib/error.{cc,h}:
- remove constness of va_list parameter to fix build on amd64 and co
Thanks Eric Valette! (Closes: #588610)
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/error.cc | 9 | ||||
-rw-r--r-- | apt-pkg/contrib/error.h | 4 |
2 files changed, 6 insertions, 7 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); diff --git a/apt-pkg/contrib/error.h b/apt-pkg/contrib/error.h index 73735162d..e5517c2da 100644 --- a/apt-pkg/contrib/error.h +++ b/apt-pkg/contrib/error.h @@ -278,9 +278,9 @@ private: /*{{{*/ std::list<MsgStack> Stacks; bool InsertErrno(MsgType type, const char* Function, - const char* Description, va_list const &args); + const char* Description, va_list &args); bool Insert(MsgType type, const char* Description, - va_list const &args); + va_list &args); /*}}}*/ }; /*}}}*/ |