X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=libcitadel%2Flib%2Fstringbuf.c;h=a245c3c37ea81483f8bf1ffd4410e67f28097362;hb=4aa22c590d9d96a0590020cbe54d6b193ea1deb6;hp=cdbd3651d5402440f7bf8a12c00866dfb8f2fef5;hpb=241813b91cc893f8a252721c851d14e205efaaca;p=citadel.git diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index cdbd3651d..a245c3c37 100644 --- a/libcitadel/lib/stringbuf.c +++ b/libcitadel/lib/stringbuf.c @@ -1184,19 +1184,11 @@ void StrBufStripAllBut(StrBuf *Buf, char leftboundary, char rightboundary) if (pRight != NULL) { StrBufCutAt(Buf, 0, pRight); } - else { - StrBufCutAt(Buf, 0, Buf->buf); - return; - } pLeft = strrchr(ChrPtr(Buf), leftboundary); if (pLeft != NULL) { StrBufCutLeft(Buf, pLeft - Buf->buf + 1); } - else { - StrBufCutAt(Buf, 0, Buf->buf); - return; - } }