From 37949e9ed8092b74cec31996580cab9cea02e1b1 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Thu, 8 Jun 2017 20:47:25 -0400 Subject: [PATCH] bt_ctf_stream_get_discarded_events_count(): return int MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- include/babeltrace/ctf-writer/stream.h | 2 +- lib/ctf-ir/stream.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/babeltrace/ctf-writer/stream.h b/include/babeltrace/ctf-writer/stream.h index 67422f67..56b6bff8 100644 --- a/include/babeltrace/ctf-writer/stream.h +++ b/include/babeltrace/ctf-writer/stream.h @@ -49,7 +49,7 @@ extern "C" { * * Returns the number of discarded events, a negative value on error. */ -extern int64_t bt_ctf_stream_get_discarded_events_count( +extern int bt_ctf_stream_get_discarded_events_count( struct bt_ctf_stream *stream, uint64_t *count); /* diff --git a/lib/ctf-ir/stream.c b/lib/ctf-ir/stream.c index fa1122e3..3348eaed 100644 --- a/lib/ctf-ir/stream.c +++ b/lib/ctf-ir/stream.c @@ -998,20 +998,20 @@ end: return stream_class; } -int64_t bt_ctf_stream_get_discarded_events_count( +int bt_ctf_stream_get_discarded_events_count( struct bt_ctf_stream *stream, uint64_t *count) { - int64_t ret = 0; + int ret = 0; if (!stream) { BT_LOGW_STR("Invalid parameter: stream is NULL."); - ret = (int64_t) -1; + ret = -1; goto end; } if (!count) { BT_LOGW_STR("Invalid parameter: count is NULL."); - ret = (int64_t) -1; + ret = -1; goto end; } @@ -1019,7 +1019,7 @@ int64_t bt_ctf_stream_get_discarded_events_count( BT_LOGW("Invalid parameter: stream is not a CTF writer stream: " "stream-addr=%p, stream-name=\"%s\"", stream, bt_ctf_stream_get_name(stream)); - ret = (int64_t) -1; + ret = -1; goto end; } -- 2.34.1