relayd: use version macros from build rather than scanf
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 5 Aug 2013 19:26:41 +0000 (15:26 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 5 Aug 2013 19:39:48 +0000 (15:39 -0400)
Acked-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/bin/lttng-relayd/main.c

index 3b9f6708a3685e61e0a6918e94732046a9b9151f..3bef52b43068e8f8b2ac5ce4a5fbe9289b7fb9ca 100644 (file)
@@ -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)) {
This page took 0.027486 seconds and 4 git commands to generate.