projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7b0d4a
)
- minor shrinkage
author
Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>
Thu, 14 Dec 2006 11:27:58 +0000
(11:27 -0000)
committer
Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>
Thu, 14 Dec 2006 11:27:58 +0000
(11:27 -0000)
coreutils/diff.c
patch
|
blob
|
history
diff --git
a/coreutils/diff.c
b/coreutils/diff.c
index 7a9f8c7dddb46776fd2e49dd23b610352daa803f..2ed26babe83c7592985bd190d2d52e4b330d803d 100644
(file)
--- a/
coreutils/diff.c
+++ b/
coreutils/diff.c
@@
-1105,10
+1105,12
@@
static void diffdir(char *p1, char *p2)
/* 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. */