svn commit: trunk/busybox/coreutils
aldot at busybox.net
aldot at busybox.net
Thu Dec 14 03:27:59 PST 2006
Author: aldot
Date: 2006-12-14 03:27:58 -0800 (Thu, 14 Dec 2006)
New Revision: 16919
Log:
- minor shrinkage
Modified:
trunk/busybox/coreutils/diff.c
Changeset:
Modified: trunk/busybox/coreutils/diff.c
===================================================================
--- trunk/busybox/coreutils/diff.c 2006-12-14 08:12:18 UTC (rev 16918)
+++ trunk/busybox/coreutils/diff.c 2006-12-14 11:27:58 UTC (rev 16919)
@@ -1105,10 +1105,12 @@
/* Check for trailing slashes. */
- if (p1[strlen(p1) - 1] == '/')
- p1[strlen(p1) - 1] = '\0';
- if (p2[strlen(p2) - 1] == '/')
- p2[strlen(p2) - 1] = '\0';
+ dp1 = last_char_is(p1, '/');
+ if (dp1 != NULL)
+ *dp1 = '\0';
+ dp2 = last_char_is(p2, '/');
+ if (dp2 != NULL)
+ *dp2 = '\0';
/* Get directory listings for p1 and p2. */
More information about the busybox-cvs
mailing list