diff options
Diffstat (limited to 'lib/libstand')
-rw-r--r-- | lib/libstand/nfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libstand/nfs.c b/lib/libstand/nfs.c index a7a7ccb..adb0a11 100644 --- a/lib/libstand/nfs.c +++ b/lib/libstand/nfs.c @@ -1465,8 +1465,9 @@ nfs_readdir(struct open_file *f, struct dirent *d) d->d_name[d->d_namlen] = '\0'; pos = roundup(d->d_namlen, sizeof(uint32_t)) / sizeof(uint32_t); - fp->off = cookie = ((uint64_t)ntohl(rent->nameplus[pos++]) << 32) | - ntohl(rent->nameplus[pos++]); + fp->off = cookie = ((uint64_t)ntohl(rent->nameplus[pos]) << 32) | + ntohl(rent->nameplus[pos + 1]); + pos += 2; buf = (u_char *)&rent->nameplus[pos]; return (0); } |