- for (count = 0, b = buffer; count < sizeof (buffer); ++count, ++b) {
- if (read (dir->fd, b, 1) != 1) {
- /* ### Check for EOF */
- goto error;
+ for (count = 0, b = buffer; count < sizeof (buffer); ++b) {
+ if (!_dirread1 (dir, b)) {
+ goto exitpoint;