summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-03-29 12:21:53 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2013-03-29 12:21:53 (GMT)
commit8172d054db64bc80a355db111b484719930045bc (patch)
tree9bd745b27650c87747adb8d4fd226cea1d7b38ae
parent1d14569a66c741361afe0ebc6e2ef8ba9a6aeb71 (diff)
downloadbusybox-8172d054db64bc80a355db111b484719930045bc.tar.gz
busybox-8172d054db64bc80a355db111b484719930045bc.tar.bz2
lineedit: \W on "/bin" should show "bin", not "/bin"
function old new delta parse_and_put_prompt 793 785 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/lineedit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 45448df..93ab864 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1875,7 +1875,7 @@ static void parse_and_put_prompt(const char *prmt_ptr)
if (c == 'w')
break;
cp = strrchr(pbuf, '/');
- if (cp != NULL && cp != pbuf)
+ if (cp)
pbuf = (char*)cp + 1;
break;
# endif