]> git.saurik.com Git - apt.git/commitdiff
fix: Consecutive return, break, continue, goto or throw statements are unnecessary.
authorDavid Kalnischkies <david@kalnischkies.de>
Fri, 26 Sep 2014 22:46:43 +0000 (00:46 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Fri, 26 Sep 2014 22:47:08 +0000 (00:47 +0200)
Git-Dch: Ignore
Reported-By: cppcheck
apt-inst/dirstream.cc
apt-pkg/contrib/fileutl.cc

index 39ebb3bb4433699f8e7ec6c6f25e4f004c0c7986..888020bfb983d671ba67f392f0a4681370ae9892 100644 (file)
@@ -76,7 +76,6 @@ bool pkgDirStream::DoItem(Item &Itm,int &Fd)
         if(mkdir(Itm.Name,Itm.Mode) < 0)
            return false;
         return true;
         if(mkdir(Itm.Name,Itm.Mode) < 0)
            return false;
         return true;
-        break;
       }
       case Item::FIFO:
       break;
       }
       case Item::FIFO:
       break;
index 9e77020636f4ab5987370d68529800ff7820526e..df409fa36b54e21eeebc1eeef0bb6f51e2b7cb8f 100644 (file)
@@ -2126,10 +2126,8 @@ bool Popen(const char* Args[], FileFd &Fd, pid_t &Child, FileFd::OpenMode Mode)
 
    int Pipe[2] = {-1, -1};
    if(pipe(Pipe) != 0)
 
    int Pipe[2] = {-1, -1};
    if(pipe(Pipe) != 0)
-   {
       return _error->Errno("pipe", _("Failed to create subprocess IPC"));
       return _error->Errno("pipe", _("Failed to create subprocess IPC"));
-      return NULL;
-   }
+
    std::set<int> keep_fds;
    keep_fds.insert(Pipe[0]);
    keep_fds.insert(Pipe[1]);
    std::set<int> keep_fds;
    keep_fds.insert(Pipe[0]);
    keep_fds.insert(Pipe[1]);