Fix: remove dead code in msgpack.c
[lttng-modules.git] / src / lib / msgpack / msgpack.c
index 0803bc657646b49f4dcbc7c3ffad244a0ec33a44..f3eca64a654cd5cfcfcc9cfabdaf5fca387e5f46 100644 (file)
@@ -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.024671 seconds and 4 git commands to generate.