[lttng-dev] [lttng-tool] Fix: wrong casting of return value
David Goulet
dgoulet at efficios.com
Thu Jun 12 14:02:21 EDT 2014
Merged!
On 09 Jun (11:40:36), Jonathan Rajotte Julien wrote:
> 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 at gmail.com>
> ---
> src/lib/lttng-ctl/save.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/lib/lttng-ctl/save.c b/src/lib/lttng-ctl/save.c
> index d136b2d..d414a9d 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) {
> --
> 2.0.0
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: Digital signature
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20140612/a4d82573/attachment.sig>
More information about the lttng-dev
mailing list