aboutsummaryrefslogtreecommitdiff
path: root/coreutils/diff.c
diff options
context:
space:
mode:
authoraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-12-14 11:27:58 +0000
committeraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-12-14 11:27:58 +0000
commit11a251cf50f30615713e170686308453f4a218ca (patch)
treeb963999fc54eddb65f1929b894f868e24851fc9c /coreutils/diff.c
parent8ee35796f58f32a00704394e658f563656c0407d (diff)
downloadbusybox-w32-11a251cf50f30615713e170686308453f4a218ca.tar.gz
busybox-w32-11a251cf50f30615713e170686308453f4a218ca.tar.bz2
busybox-w32-11a251cf50f30615713e170686308453f4a218ca.zip
- minor shrinkage
git-svn-id: svn://busybox.net/trunk/busybox@16919 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils/diff.c')
-rw-r--r--coreutils/diff.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/coreutils/diff.c b/coreutils/diff.c
index 7a9f8c7dd..2ed26babe 100644
--- a/coreutils/diff.c
+++ b/coreutils/diff.c
@@ -1105,10 +1105,12 @@ static void diffdir(char *p1, char *p2)
1105 1105
1106 /* Check for trailing slashes. */ 1106 /* Check for trailing slashes. */
1107 1107
1108 if (p1[strlen(p1) - 1] == '/') 1108 dp1 = last_char_is(p1, '/');
1109 p1[strlen(p1) - 1] = '\0'; 1109 if (dp1 != NULL)
1110 if (p2[strlen(p2) - 1] == '/') 1110 *dp1 = '\0';
1111 p2[strlen(p2) - 1] = '\0'; 1111 dp2 = last_char_is(p2, '/');
1112 if (dp2 != NULL)
1113 *dp2 = '\0';
1112 1114
1113 /* Get directory listings for p1 and p2. */ 1115 /* Get directory listings for p1 and p2. */
1114 1116