fix: remove floating-point arguments in msgpack
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 14 Dec 2020 16:20:11 +0000 (11:20 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 14 Dec 2020 16:32:20 +0000 (11:32 -0500)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I6366ac303157e4ab66045b09c6f03aadee0717c8

include/lttng/msgpack.h
src/lib/msgpack/msgpack.c

index e5c011ea877da7a931885d7bd2dd3bd2abb7d503..5db7c424a3ecdb7495e8f0c48388bfd3a33304ea 100644 (file)
@@ -49,7 +49,6 @@ int lttng_msgpack_write_unsigned_integer(
                struct lttng_msgpack_writer *writer, uint64_t value);
 int lttng_msgpack_write_signed_integer(
                struct lttng_msgpack_writer *writer, int64_t value);
-int lttng_msgpack_write_double(struct lttng_msgpack_writer *writer, double value);
 int lttng_msgpack_write_str(struct lttng_msgpack_writer *writer,
                const char *value);
 int lttng_msgpack_begin_map(struct lttng_msgpack_writer *writer, size_t count);
index 16658d11b7843aaebe995126367e05d88ad8edd5..b4d9beec279839ecde9aff98462ef36da5bc8a97 100644 (file)
@@ -144,20 +144,6 @@ static inline int lttng_msgpack_append_u64(
        return lttng_msgpack_append_buffer(writer, (uint8_t *) &value, sizeof(value));
 }
 
-static inline int lttng_msgpack_append_f64(
-               struct lttng_msgpack_writer *writer, double value)
-{
-
-       union {
-               double d;
-               uint64_t u;
-       } u;
-
-       u.d = value;
-
-       return lttng_msgpack_append_u64(writer, u.u);
-}
-
 static inline int lttng_msgpack_append_i8(
                struct lttng_msgpack_writer *writer, int8_t value)
 {
@@ -182,23 +168,6 @@ static inline int lttng_msgpack_append_i64(
        return lttng_msgpack_append_u64(writer, (uint64_t) value);
 }
 
-static inline int lttng_msgpack_encode_f64(
-               struct lttng_msgpack_writer *writer, double value)
-{
-       int ret;
-
-       ret = lttng_msgpack_append_u8(writer, MSGPACK_FLOAT64_ID);
-       if (ret)
-               goto end;
-
-       ret = lttng_msgpack_append_f64(writer, value);
-       if (ret)
-               goto end;
-
-end:
-       return ret;
-}
-
 static inline int lttng_msgpack_encode_fixmap(
                struct lttng_msgpack_writer *writer, uint8_t count)
 {
@@ -494,11 +463,6 @@ end:
        return ret;
 }
 
-int lttng_msgpack_write_double(struct lttng_msgpack_writer *writer, double value)
-{
-       return lttng_msgpack_encode_f64(writer, value);
-}
-
 void lttng_msgpack_writer_init(struct lttng_msgpack_writer *writer,
                uint8_t *buffer, size_t size)
 {
This page took 0.027413 seconds and 4 git commands to generate.