aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-03-29 13:21:53 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-03-29 13:21:53 +0100
commit8172d054db64bc80a355db111b484719930045bc (patch)
tree9bd745b27650c87747adb8d4fd226cea1d7b38ae
parent1d14569a66c741361afe0ebc6e2ef8ba9a6aeb71 (diff)
downloadbusybox-8172d054db64bc80a355db111b484719930045bc.tar.gz
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 45448dfab..93ab86426 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