> if (entries_size < size) { > memcpy(start, l, copy_len); > start = (struct log_head *) > &start->data[l->size]; > } else{ > entries_size -= copy_len; > } >
Yes, the first block is executed just when the entries_size it fits in the new buffer size, otherwise we skip entries in the second block. > void > log_init(int _log_size) > { > if (_log_size > 0) > log_size = _log_size; > > what happened to log_size ? if you dont use it anymore remove it fully > please > log_size is used when the new buffer size is equal to the current buffer size and we keep the current buffer intact. _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev