random small size optimizations

This commit is contained in:
Denis Vlasenko
2007-01-12 22:10:34 +00:00
parent 21b080daa8
commit 3a34d0c08a
8 changed files with 34 additions and 23 deletions

View File

@ -88,7 +88,7 @@ char *reads(int fd, char *buffer, size_t size)
*p++ = '\0';
// avoid incorrect (unsigned) widening
offset = (off_t)(p-buffer) - (off_t)size;
// set fd position the right after the \n
// set fd position right after '\n'
if (offset && lseek(fd, offset, SEEK_CUR) == (off_t)-1)
return NULL;
}