lineedit: \W on "/bin" should show "bin", not "/bin"
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 29 Mar 2013 12:21:53 +0000 (13:21 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 29 Mar 2013 12:21:53 +0000 (13:21 +0100)
function                                             old     new   delta
parse_and_put_prompt                                 793     785      -8

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/lineedit.c

index 45448df..93ab864 100644 (file)
@@ -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