X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Fclock.h;h=82a7b45cd5294a3f35c63e172ea8105d0e5c2e0d;hb=9d36f30e825135d8fbb3ba6cb31ab10aa938b135;hp=88eca432a5733f7e4bc35f1878b911617a5119d5;hpb=277d6e1d016e69184fd49b867ff1268d3ff668f5;p=lttng-ust.git diff --git a/liblttng-ust/clock.h b/liblttng-ust/clock.h index 88eca432..82a7b45c 100644 --- a/liblttng-ust/clock.h +++ b/liblttng-ust/clock.h @@ -25,7 +25,11 @@ #include #include #include -#include "lttng-ust-uuid.h" + +/* + * Includes final \0. + */ +#define CLOCK_UUID_LEN 37 /* TRACE CLOCK */ @@ -52,7 +56,7 @@ uint64_t trace_clock_freq(void) } static __inline__ -int trace_clock_uuid(char *uuid) +const int trace_clock_uuid(char *uuid) { int ret = 0; size_t len; @@ -67,12 +71,12 @@ int trace_clock_uuid(char *uuid) if (!fp) { return -ENOENT; } - len = fread(uuid, 1, LTTNG_UST_UUID_STR_LEN - 1, fp); - if (len < LTTNG_UST_UUID_STR_LEN - 1) { + len = fread(uuid, 1, CLOCK_UUID_LEN - 1, fp); + if (len < CLOCK_UUID_LEN - 1) { ret = -EINVAL; goto end; } - uuid[LTTNG_UST_UUID_STR_LEN - 1] = '\0'; + uuid[CLOCK_UUID_LEN - 1] = '\0'; end: fclose(fp); return ret;