From: Francis Deslauriers Date: Thu, 23 Aug 2018 16:12:52 +0000 (-0400) Subject: Cleanup: use lttng_* string utility functions X-Git-Tag: v2.11.0-rc1~63 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=272839375cd306a6a824bab1018655a65b39fd9d;p=lttng-tools.git Cleanup: use lttng_* string utility functions Some systems don't have all the 'modern' string utility functions used in the project. For those cases, we reimplemented those functions using inline lttng_* functions so let's use those directly to avoid future problems. Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/relayd/relayd.c b/src/common/relayd/relayd.c index b88a536b9..745bde816 100644 --- a/src/common/relayd/relayd.c +++ b/src/common/relayd/relayd.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -1102,7 +1103,7 @@ int relayd_rotate_stream(struct lttcomm_relayd_sock *rsock, uint64_t stream_id, DBG("Sending rotate stream id %" PRIu64 " command to relayd", stream_id); /* Account for the trailing NULL. */ - len = strnlen(new_pathname, LTTNG_PATH_MAX) + 1; + len = lttng_strnlen(new_pathname, LTTNG_PATH_MAX) + 1; if (len > LTTNG_PATH_MAX) { ERR("Path used in relayd rotate stream command exceeds the maximal allowed length"); ret = -1;