Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jul 2013 17:23:14 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r252468 - head/lib/libstand
Message-ID:  <201307011723.r61HNEdQ089777@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307011723.r61HNEdQ089777>