]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/contrib/error.{cc,h}:
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 10 Jul 2010 11:51:47 +0000 (13:51 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 10 Jul 2010 11:51:47 +0000 (13:51 +0200)
  - remove constness of va_list parameter to fix build on amd64 and co
    Thanks Eric Valette! (Closes: #588610)

apt-pkg/contrib/error.cc
apt-pkg/contrib/error.h
debian/changelog

index 8cee21c9c8c916637c8135e502972afc2068417d..fbb6e463631e8058521aff6d81036816a736e028 100644 (file)
@@ -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);
 
index 73735162ddc0d77f9faad7a3f7bc6873926ca22d..e5517c2da784d1153877871fc6bf04b8f1a87bbc 100644 (file)
@@ -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);
                                                                        /*}}}*/
 };
                                                                        /*}}}*/
index a4ee9a7f8067df7d2fc9c6be8f9bb250d8beb59a..23a5f93515243ece0b678f34ada387a0d40fb76a 100644 (file)
@@ -1,3 +1,12 @@
+apt (0.7.26~exp10) UNRELEASED; urgency=low
+
+  [ David Kalnischkies ]
+  * apt-pkg/contrib/error.{cc,h}:
+    - remove constness of va_list parameter to fix build on amd64 and co
+      Thanks Eric Valette! (Closes: #588610)
+
+ -- David Kalnischkies <kalnischkies@gmail.com>  Sat, 10 Jul 2010 13:44:32 +0200
+
 apt (0.7.26~exp9) experimental; urgency=low
 
   [ David Kalnischkies ]