From: Jonathan Rajotte Julien Date: Mon, 9 Jun 2014 15:40:36 +0000 (-0400) Subject: Fix: wrong casting of return value X-Git-Tag: v2.5.0-rc2~11 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=106d4b465b1e53ee4c38976253a284a1d4c7512d;p=lttng-tools.git Fix: wrong casting of return value 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 Signed-off-by: David Goulet --- diff --git a/src/lib/lttng-ctl/save.c b/src/lib/lttng-ctl/save.c index d136b2d98..d414a9d1d 100644 --- a/src/lib/lttng-ctl/save.c +++ b/src/lib/lttng-ctl/save.c @@ -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) {