From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Jackson Date: Sat, 05 Feb 2005 22:04:32 +0000 Subject: Re: [PATCH, UDEV] change no_trailing_slash() to remove all trailing Message-Id: <20050205140432.19acf0da.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 Michael wrote: > while (len > 0 && path[len-1] = '/') I think you'd better make that: while (len > 1 && path[len-1] = '/') or else you can eat your last slash. The call no_trailing_slash("/") should produce "/", not "". Not that anyone is likely to call no_trailing_slash("////") very often ;). -- 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