Fix: wrong casting of return value
authorJonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Mon, 9 Jun 2014 15:40:36 +0000 (11:40 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 12 Jun 2014 17:58:20 +0000 (13:58 -0400)
The function uri_parse_str_urls return a ssize_t and the return was
casted to a size_t. This caused the following error checking to fail as
-1 was interpreted as 18446744073709551615.

Fixes #803

Signed-off-by: Jonathan Rajotte Julien <jonathan.r.julien@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/lib/lttng-ctl/save.c

index d136b2d98ab6b2f8ff06012160be05d14f78ac75..d414a9d1d8c31d100aff87145c968f57e6b667e9 100644 (file)
@@ -99,7 +99,8 @@ int lttng_save_session_attr_set_output_url(
        struct lttng_save_session_attr *attr, const char *url)
 {
        int ret = 0;
-       size_t len, size;
+       size_t len;
+       ssize_t size;
        struct lttng_uri *uris = NULL;
 
        if (!attr) {
This page took 0.034886 seconds and 4 git commands to generate.