From owner-freebsd-hackers Sat Jan 13 22:11:42 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id B4EF637B401 for ; Sat, 13 Jan 2001 22:11:24 -0800 (PST) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=root) by scientia.demon.co.uk with esmtp (Exim 3.20 #1) id 14HgNt-0009zd-00; Sun, 14 Jan 2001 06:11:21 +0000 Received: (from ben@localhost) by strontium.scientia.demon.co.uk (8.11.1/8.11.1) id f0E6BKb45863; Sun, 14 Jan 2001 06:11:20 GMT (envelope-from ben) Date: Sun, 14 Jan 2001 06:11:20 +0000 From: Ben Smithurst To: Warner Losh Cc: "W.H.Scholten" , Alfred Perlstein , freebsd-hackers@FreeBSD.ORG Subject: Re: pppd & mkdir diff Message-ID: <20010114061120.K35575@strontium.scientia.demon.co.uk> References: <3A6025F1.794BDF32@xs4all.nl> <3A5C843C.794BDF32@xs4all.nl> <20010111132509.J7240@fw.wintelcom.net> <3A5EE6B1.41C67EA6@xs4all.nl> <20010112081422.U7240@fw.wintelcom.net> <3A6025F1.794BDF32@xs4all.nl> <200101140355.f0E3tIs95857@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200101140355.f0E3tIs95857@harmony.village.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Warner Losh wrote: > In message <3A6025F1.794BDF32@xs4all.nl> "W.H.Scholten" writes: > : + while (path[ strlen(path)-1 ] == '/') path[ strlen(path)-1 ] = 0; > > Style(9) says write this like: > while (path[ strlen(path)-1 ] == '/') > path[ strlen(path)-1 ] = 0; No it doesn't. "No spaces after `(' or `[' or preceding `]' or `)' characters." "Unary operators don't require spaces, binary operators do." while (path[strlen(path) - 1] == '/') path[strlen(path) - 1] = 0; :-) Preferably '\0' too of course like you say later. -- Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message