From owner-svn-src-head@FreeBSD.ORG Mon Jul 1 17:23:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5F2D68B9; Mon, 1 Jul 2013 17:23:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 51F7C172D; Mon, 1 Jul 2013 17:23:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r61HNEFo089778; Mon, 1 Jul 2013 17:23:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r61HNEdQ089777; Mon, 1 Jul 2013 17:23:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201307011723.r61HNEdQ089777@svn.freebsd.org> From: Alexander Motin Date: Mon, 1 Jul 2013 17:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252468 - head/lib/libstand X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2013 17:23:14 -0000 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); }