From owner-freebsd-hackers Sat Jan 13 19:55:43 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from harmony.village.org (rover.village.org [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 75B7937B402 for ; Sat, 13 Jan 2001 19:55:25 -0800 (PST) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.1/8.11.1) with ESMTP id f0E3tIs95857; Sat, 13 Jan 2001 20:55:18 -0700 (MST) (envelope-from imp@harmony.village.org) Message-Id: <200101140355.f0E3tIs95857@harmony.village.org> To: "W.H.Scholten" Subject: Re: pppd & mkdir diff Cc: Alfred Perlstein , freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Sat, 13 Jan 2001 09:54:57 GMT." <3A6025F1.794BDF32@xs4all.nl> References: <3A6025F1.794BDF32@xs4all.nl> <3A5C843C.794BDF32@xs4all.nl> <20010111132509.J7240@fw.wintelcom.net> <3A5EE6B1.41C67EA6@xs4all.nl> <20010112081422.U7240@fw.wintelcom.net> Date: Sat, 13 Jan 2001 20:55:18 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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; : + : + slash = strrchr(path, '/'); : + if (slash) { : + *slash = 0; this is not an integer, but rather a character. *slash = '\0'; please. : + while (path[ strlen(path)-1 ] == '/') path[ strlen(path)-1 ] = 0; Ditto. But why do this at all? 'mkdir /a/b/////d/e' is required by posix to create /a/b/d/e if /a/b/d exists. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message