summaryrefslogtreecommitdiffstats
path: root/bftw.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-05-22 13:14:27 -0400
committerTavian Barnes <tavianator@tavianator.com>2016-05-22 13:14:27 -0400
commita36577183430607196e88c2b951f2dc71a06dbaf (patch)
treec523e4dff632214692dd93a417ee889a7623c9d3 /bftw.c
parent120fc56d436a4b8791fc82389192a6ca2efdece5 (diff)
downloadbfs-a36577183430607196e88c2b951f2dc71a06dbaf.tar.xz
dstring: Clean up the API a bit.
Diffstat (limited to 'bftw.c')
-rw-r--r--bftw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bftw.c b/bftw.c
index 8dd98c9..60bc145 100644
--- a/bftw.c
+++ b/bftw.c
@@ -627,7 +627,10 @@ static int bftw_path_concat(struct bftw_state *state, const char *subpath) {
state->status = BFTW_CHILD;
- return dstrcatat(&state->path, nameoff, subpath);
+ if (dstresize(&state->path, nameoff) != 0) {
+ return -1;
+ }
+ return dstrcat(&state->path, subpath);
}
/**