소스 검색

fix: Consecutive return, break, continue, goto or throw statements are unnecessary.

Git-Dch: Ignore
Reported-By: cppcheck
David Kalnischkies 11 년 전
부모
커밋
5e49cbb7b6
2개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 1
      apt-inst/dirstream.cc
  2. 1 3
      apt-pkg/contrib/fileutl.cc

+ 0 - 1
apt-inst/dirstream.cc

@@ -76,7 +76,6 @@ bool pkgDirStream::DoItem(Item &Itm,int &Fd)
 	 if(mkdir(Itm.Name,Itm.Mode) < 0)
 	    return false;
 	 return true;
-	 break;
       }
       case Item::FIFO:
       break;

+ 1 - 3
apt-pkg/contrib/fileutl.cc

@@ -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)
-   {
       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]);