Code review comment for lp:~fehwalker/ubuntu/raring/ureadahead/fix-969926

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for submitting this patch. I did have one question. Is there any value to keeping the third check, the stat() call? If stat were going to fail, then lstat would also fail, so I think the check can simply become

if ((lstat (pathname, &statbuf) < 0)
     || S_ISLNK (statbuf.st_mode)
     || (! S_ISREG(statbuf.st_mode)))
 return 0;

I certainly could be wrong :) if so please let me know.

review: Needs Fixing

« Back to merge proposal