svn commit: r252468 - head/lib/libstand
Alexander Motin
mav at FreeBSD.org
Mon Jul 1 17:23:14 UTC 2013
Author: mav
Date: Mon Jul 1 17:23:13 2013
New Revision: 252468
URL: http://svnweb.freebsd.org/changeset/base/252468
Log:
Move pos++ out of the complicated equation, introduced at r240780.
There is an oppinion that result of that equation is compiler-specific.
Submitted by: dt71 at gmx.com, kientzle
Reviewed by: rmacklem
MFC after: 3 days
Modified:
head/lib/libstand/nfs.c
Modified: head/lib/libstand/nfs.c
==============================================================================
--- head/lib/libstand/nfs.c Mon Jul 1 14:49:23 2013 (r252467)
+++ head/lib/libstand/nfs.c Mon Jul 1 17:23:13 2013 (r252468)
@@ -1465,8 +1465,9 @@ nfs_readdir(struct open_file *f, struct
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);
}
More information about the svn-src-head
mailing list