From: Florian Forster Date: Thu, 15 Sep 2016 06:59:16 +0000 (+0200) Subject: src/daemon/common.[ch]: Reimplement strjoin(). X-Git-Tag: collectd-5.7.0~85^2 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=afb38f31abd27d5b4ce08023f8bbbaeeb353c55f;hp=afb38f31abd27d5b4ce08023f8bbbaeeb353c55f;p=collectd.git src/daemon/common.[ch]: Reimplement strjoin(). This new implementation truncates fields rather than aborting when there is more space in the output buffer. Since strjoin() is mostly used to fill plugin and type instances, which are otherwise usually filled with sstrncpy(), i.e. also truncate the string rather than erroring out. The unit test has also been rewritten to test the new functionality. The new functions have been formatted with clang-format. Fixes: #1792 ---