but no warnings from gcc helps
if (Extract.Control == 0)
return true;
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[])
}
int main(int argc, const char *argv[])
while (feof(F) == 0)
{
char Line[300];
while (feof(F) == 0)
{
char Line[300];
- fgets(Line,sizeof(Line),F);
+ if (fgets(Line,sizeof(Line),F) == NULL)
+ return false;
Itm.Name = _strstrip(Line);
Itm.Type = pkgDirStream::Item::File;
if (Line[strlen(Line)-1] == '/')
Itm.Name = _strstrip(Line);
Itm.Type = pkgDirStream::Item::File;
if (Line[strlen(Line)-1] == '/')