From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Jackson Date: Sun, 06 Feb 2005 01:11:41 +0000 Subject: Re: [PATCH, UDEV] change no_trailing_slash() to remove all trailing Message-Id: <20050205171141.0e2c7eab.pj@sgi.com> List-Id: References: <200502051818.54277.mbuesch@freenet.de> In-Reply-To: <200502051818.54277.mbuesch@freenet.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org What if someone does: strcpy(buf, "/"); no_trailing_slash(buf); strcat(buf, "foo"); Would you expect "foo", or "/foo" ? Actually, I did not expect this to be called in the middle of a construction, after only explicit constant strings had been added. I would have expected it to be called after the final construction, following the concatenation of a variable string. And I would have expected it to scrupulously avoid changing the meaning of the path - just cosmetic trimming. But apparently my expectations are confused. Feel free to dismiss my comments. -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson 1.650.933.1373, 1.925.600.0401 ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel