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