From owner-svn-src-all@freebsd.org Sun Apr 3 19:11:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64EACB014D8; Sun, 3 Apr 2016 19:11:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 30A9110F6; Sun, 3 Apr 2016 19:11:43 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c110-21-41-193.carlnfd1.nsw.optusnet.com.au (c110-21-41-193.carlnfd1.nsw.optusnet.com.au [110.21.41.193]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 5E989D63115; Mon, 4 Apr 2016 05:11:35 +1000 (AEST) Date: Mon, 4 Apr 2016 05:11:35 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r297525 - head/sys/compat/linux In-Reply-To: <201604031440.u33EesB7057019@repo.freebsd.org> Message-ID: <20160404045828.M816@besplex.bde.org> References: <201604031440.u33EesB7057019@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=EfU1O6SC c=1 sm=1 tr=0 a=73JWPhLeruqQCjN69UNZtQ==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=RwOoYL7EEKuF5z8t64wA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Apr 2016 19:11:44 -0000 On Sun, 3 Apr 2016, Pedro F. Giffuni wrote: > Author: pfg > Log: > Fix indentation oops. > > Modified: > head/sys/compat/linux/linux_misc.c > > Modified: head/sys/compat/linux/linux_misc.c > ============================================================================== > --- head/sys/compat/linux/linux_misc.c Sun Apr 3 14:38:26 2016 (r297524) > +++ head/sys/compat/linux/linux_misc.c Sun Apr 3 14:40:54 2016 (r297525) > @@ -896,12 +896,12 @@ linux_utimensat(struct thread *td, struc > } > timesp = times; > > - if (times[0].tv_nsec == UTIME_OMIT && > - times[1].tv_nsec == UTIME_OMIT) > /* This breaks POSIX, but is what the Linux kernel does > * _on purpose_ (documented in the man page for utimensat(2)), > * so we must follow that behaviour. */ > - return (0); > + if (times[0].tv_nsec == UTIME_OMIT && > + times[1].tv_nsec == UTIME_OMIT) > + return (0); > } > > if (args->pathname != NULL) The comment is still not written in BSD style. The patch shows a bug in svn(?) diff. The comment was moved, but the patch shows movement of the if statement. The indentation was only changed in the return statement. The comment was also misindented. Moving it fixes this, but I prefer it where it was. Comments are often placed before an if statement and not properly worded for that placement. They say that something is done unconditionally but that is clearly wrong since the action is conditional on the if statement. Here "this" in the comment used to refer to the action of returning, but is ambiguous enough to still make sense after the move. It now refers to the action of doing the check and sometimes returning. The block of code is short enough that the ambiguity is easy to resolve. Bruce