projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: replace assert with proper error handling
[babeltrace.git]
/
formats
/
lttng-live
/
lttng-live-functions.c
diff --git
a/formats/lttng-live/lttng-live-functions.c
b/formats/lttng-live/lttng-live-functions.c
index aee78cbf66012d204bd46cd1a34d11a545082311..1f4b4dbc6ff3941bf6d1df767655869ef83daa30 100644
(file)
--- a/
formats/lttng-live/lttng-live-functions.c
+++ b/
formats/lttng-live/lttng-live-functions.c
@@
-454,7
+454,13
@@
int get_data_packet(struct lttng_live_ctx *ctx,
ret = ret_len;
goto error;
}
ret = ret_len;
goto error;
}
- assert(ret_len == sizeof(rp));
+ if (ret_len != sizeof(rp)) {
+ fprintf(stderr, "[error] get_data_packet: expected %" PRId64
+ ", received %" PRId64 "\n", ret_len,
+ sizeof(rp));
+ ret = -1;
+ goto error;
+ }
rp.flags = be32toh(rp.flags);
rp.flags = be32toh(rp.flags);
This page took
0.023392 seconds
and
4
git commands to generate.