From: Mathieu Desnoyers Date: Mon, 5 Aug 2013 19:26:41 +0000 (-0400) Subject: relayd: use version macros from build rather than scanf X-Git-Tag: v2.3.0-rc3~61 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d83a952ce0d3a03bd3d36505d665db99b2c65fa2;p=lttng-tools.git relayd: use version macros from build rather than scanf Acked-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 3b9f6708a..3bef52b43 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -1187,12 +1187,8 @@ int relay_send_version(struct lttcomm_relayd_hdr *recv_hdr, goto end; } - ret = sscanf(VERSION, "%10u.%10u", &reply.major, &reply.minor); - if (ret < 2) { - ERR("Error in scanning version"); - ret = -1; - goto end; - } + reply.major = RELAYD_VERSION_COMM_MAJOR; + reply.minor = RELAYD_VERSION_COMM_MINOR; /* Major versions must be the same */ if (reply.major != be32toh(msg.major)) {