port: use ust-endian.h compat
[deliverable/lttng-ust.git] / libmsgpack / msgpack.c
index 0803bc657646b49f4dcbc7c3ffad244a0ec33a44..564639cd576c49e630ced610b576e231f5160a1c 100644 (file)
@@ -76,7 +76,7 @@
 
 #else /* __KERNEL__ */
 
-#include <endian.h>
+#include <lttng/ust-endian.h>
 #include <stdio.h>
 #include <string.h>
 
@@ -316,7 +316,7 @@ int lttng_msgpack_begin_map(struct lttng_msgpack_writer *writer, size_t count)
 {
        int ret;
 
-       if (count < 0 || count >= (1 << 16)) {
+       if (count >= (1 << 16)) {
                ret = -1;
                goto end;
        }
@@ -343,7 +343,7 @@ int lttng_msgpack_begin_array(
 {
        int ret;
 
-       if (count < 0 || count >= (1 << 16)) {
+       if (count >= (1 << 16)) {
                ret = -1;
                goto end;
        }
@@ -370,7 +370,8 @@ int lttng_msgpack_write_str(struct lttng_msgpack_writer *writer,
 {
        int ret;
        size_t length = strlen(str);
-       if (length < 0 || length >= (1 << 16)) {
+
+       if (length >= (1 << 16)) {
                ret = -1;
                goto end;
        }
This page took 0.029294 seconds and 5 git commands to generate.