Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/dirent.c

    rbebd154 ra35b458  
    3939#include <errno.h>
    4040#include <assert.h>
    41 #include <string.h>
    42 
    43 struct __dirstream {
    44         int fd;
    45         struct dirent res;
    46         aoff64_t pos;
    47 };
    4841
    4942/** Open directory.
     
    9386        ssize_t len = 0;
    9487
    95         rc = vfs_read_short(dirp->fd, dirp->pos, dirp->res.d_name,
    96             sizeof(dirp->res.d_name), &len);
     88        rc = vfs_read_short(dirp->fd, dirp->pos, &dirp->res.d_name[0],
     89            NAME_MAX + 1, &len);
    9790        if (rc != EOK) {
    9891                errno = rc;
    9992                return NULL;
    10093        }
    101 
    102         assert(strnlen(dirp->res.d_name, sizeof(dirp->res.d_name)) < sizeof(dirp->res.d_name));
    10394
    10495        dirp->pos += len;
Note: See TracChangeset for help on using the changeset viewer.