From: Philippe Proulx Date: Fri, 9 Jun 2017 00:47:25 +0000 (-0400) Subject: bt_ctf_stream_get_discarded_events_count(): return int X-Git-Tag: v2.0.0-pre1~26 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=37949e9ed8092b74cec31996580cab9cea02e1b1 bt_ctf_stream_get_discarded_events_count(): return int Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- 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; }