X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/75a90b93257ea81d42331c03b56bd6589c62e065..453b82a388013e522b3a1b9fcd6ed0810dab1f4f:/test/interactive-helper/extract-control.cc diff --git a/test/interactive-helper/extract-control.cc b/test/interactive-helper/extract-control.cc index 29dcbf371..852ec4ee9 100644 --- a/test/interactive-helper/extract-control.cc +++ b/test/interactive-helper/extract-control.cc @@ -1,12 +1,16 @@ +#include + #include #include +#include +#include #include #include using namespace std; -bool ExtractMember(const char *File,const char *Member) +static bool ExtractMember(const char *File,const char *Member) { FileFd Fd(File,FileFd::ReadOnly); debDebFile Deb(Fd); @@ -20,8 +24,7 @@ bool ExtractMember(const char *File,const char *Member) if (Extract.Control == 0) return true; - write(STDOUT_FILENO,Extract.Control,Extract.Length); - return true; + return write(STDOUT_FILENO,Extract.Control,Extract.Length) != -1; } int main(int argc, const char *argv[])