The removed code block looks sensible. However, this is actually done
somewhere else (compare the Android Logger backend, which works in a
similar way and doesn't really handle the dump value).
Change-Id: I68161e26bda09833f2a1c20870fa8f4f72c9acaa
* so at least reading requires no preparatory steps. */
struct zero_copy_priv_data *const zpd = (struct zero_copy_priv_data *)fdi->priv_data;
- zpd->dump = monitor ? 0 : dump;
+ zpd->dump = !monitor && dump;
zpd->monitor = monitor;
zpd->prev_read_ts = monitor ? get_zlog_clock() : 0;
zpd->this_read_ts = zpd->prev_read_ts;
dlogutil_entry_s *const entry = item->entry;
free(item);
- if (zpd->dump) {
- -- zpd->dump;
- if (!zpd->dump)
- free_entry_list(&zpd->items);
- }
-
return entry;
}
uint64_t prev_read_ts;
uint64_t this_read_ts;
struct zlog_entry_list *items;
- int dump;
+ bool dump;
bool monitor;
bool eof;
};