X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/72b2accb108e3d3ec8113ce2d183638c719a5d0d..99fdd8034b4a5cdb0100a33d0b3d5e26079c1695:/test/interactive-helper/extract-control.cc?ds=inline diff --git a/test/interactive-helper/extract-control.cc b/test/interactive-helper/extract-control.cc index a1b3600aa..852ec4ee9 100644 --- a/test/interactive-helper/extract-control.cc +++ b/test/interactive-helper/extract-control.cc @@ -1,13 +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); @@ -21,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[])