Date: Sat, 13 Jan 2001 20:55:18 -0700 From: Warner Losh <imp@harmony.village.org> To: "W.H.Scholten" <whs@xs4all.nl> Cc: Alfred Perlstein <bright@wintelcom.net>, freebsd-hackers@FreeBSD.ORG Subject: Re: pppd & mkdir diff Message-ID: <200101140355.f0E3tIs95857@harmony.village.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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101140355.f0E3tIs95857>
