]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/fileutl.cc
(error) va_list 'args' was opened but not closed by va_end()
[apt.git] / apt-pkg / contrib / fileutl.cc
index b041ef131366feb56722f25dbe1b45c61ad44940..76eb6c7f0cdb6cb19745f9d21fa077d288eb1db2 100644 (file)
@@ -2656,13 +2656,12 @@ bool FileFd::FileFdErrno(const char *Function, const char *Description,...)
    va_list args;
    size_t msgSize = 400;
    int const errsv = errno;
-   while (true)
-   {
+   bool retry;
+   do {
       va_start(args,Description);
-      if (_error->InsertErrno(GlobalError::ERROR, Function, Description, args, errsv, msgSize) == false)
-        break;
+      retry = _error->InsertErrno(GlobalError::ERROR, Function, Description, args, errsv, msgSize);
       va_end(args);
-   }
+   } while (retry);
    return false;
 }
                                                                        /*}}}*/
@@ -2671,13 +2670,12 @@ bool FileFd::FileFdError(const char *Description,...) {
    Flags |= Fail;
    va_list args;
    size_t msgSize = 400;
-   while (true)
-   {
+   bool retry;
+   do {
       va_start(args,Description);
-      if (_error->Insert(GlobalError::ERROR, Description, args, msgSize) == false)
-        break;
+      retry = _error->Insert(GlobalError::ERROR, Description, args, msgSize);
       va_end(args);
-   }
+   } while (retry);
    return false;
 }
                                                                        /*}}}*/