DescP = Buffer + Vf->Size;
// Write all but Description
- if (fwrite(Buffer,1,DescP - Buffer,stdout) < (size_t)(DescP - Buffer))
+ size_t const length = DescP - Buffer;
+ if (length != 0 && FileFd::Write(STDOUT_FILENO, Buffer, length) == false)
{
delete [] Buffer;
return false;
DescP = skipDescriptionFields(End + strlen("Description"));
}
size_t const length = End - Start;
- if (fwrite(Start, 1, length, stdout) < length)
+ if (length != 0 && FileFd::Write(STDOUT_FILENO, Start, length) == false)
{
delete [] Buffer;
return false;
// write a final newline after the last field
cout<<endl;
- delete [] Buffer;
+ delete [] Buffer;
return true;
}
/*}}}*/