projects
/
citadel
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
516831a
)
we mustn't cut the string if we don't find a boundary.
author
Wilfried Goesgens
<dothebart@citadel.org>
Thu, 10 Oct 2013 21:16:24 +0000
(23:16 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Thu, 10 Oct 2013 21:16:24 +0000
(23:16 +0200)
libcitadel/lib/stringbuf.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/stringbuf.c
b/libcitadel/lib/stringbuf.c
index cdb4ccd0a8fb48c631877b2205ad8474281058f0..eb751c8d70d0931e31abae11b3a4b7d8f638dc94 100644
(file)
--- 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;
- }
}