tivo: clean up some error checking

This commit is contained in:
Justin Maggard
2014-04-18 16:18:00 -07:00
parent 08c21f39d1
commit 27a29f9e92
2 changed files with 20 additions and 16 deletions

View File

@ -153,7 +153,7 @@ is_tivo_file(const char *path)
/* read file header */
fd = open(path, O_RDONLY);
if( !fd )
if( fd < 0 )
return 0;
if( read(fd, buf, 5) < 5 )
buf[0] = 'X';