X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/178dd062eeaa1d7e56770455e005dc27aa71f026..8d1cb6da6e21302c654da3f09de3975af7e4a11f:/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[])