Some of the pointer arguments of some functions were not asserted. This
commit fixes that. To add to this, userdata is no longer asserted, since
it is not used anywhere, only passed on to the callback. This way the
user can pass NULL if he doesn't need to use it.
Change-Id: I1c6c616fef5ccb95fc6d2465a01f0df68af2b2a6
int fdi_push_log(struct fd_info *fdi, struct sort_vector *logs, dlogutil_write_callback callback, void *userdata, struct dlogutil_filter_options *filter)
{
assert(fdi);
- assert(userdata);
+ assert(logs);
+ assert(filter);
struct dlogutil_entry *temp = fdi->ops->extract_entry(fdi);
if (!temp)
{
assert(data_fds);
assert(logs);
- assert(userdata);
+ assert(filter);
struct fd_info *best_fdi;
do {
int do_print(struct fd_info **data_fds, int fd_count, dlogutil_write_callback callback, void *userdata, bool sorting_needed, enum dlogutil_sorting_order sort_by, const struct log_config *conf, struct additional_options *opt)
{
assert(data_fds);
- assert(userdata);
+ assert(conf);
+ assert(opt);
int epoll_cnt = 0;
__attribute__((cleanup(close_fd))) int epollfd = epoll_create1(0);
assert(logs->data);
assert(IS_VECTOR_SIZE_SORTABLE(logs->size));
assert(p);
- assert(userdata);
if (sort_vector_full(logs)) {
if (logs->dump == DLOGUTIL_MODE_CONTINUOUS || logs->dump == DLOGUTIL_MODE_FULL_DUMP) {
bool process_log(const struct dlogutil_entry *e, struct timespec reference_ts, enum dlogutil_sorting_order stamp_type, dlogutil_write_callback callback, void *userdata, long timeout, int *callback_ret)
{
assert(e);
- assert(userdata);
assert(callback_ret);
if (timeout != -1) {