/* This function returns %1 if @offs was in the last write to the LEB whose data is in @buf, otherwise %0 is returned. The determination is made by checking for subsequent empty space starting from the next  */
static int is_last_write(const struct ubifs_info *c, void *buf, int offs)
/* This function returns %1 if @offs was in the last write to the LEB whose data is in @buf, otherwise %0 is returned. The determination is made by checking for subsequent empty space starting from the next  */
static int is_last_write(const struct ubifs_info *c, void *buf, int offs)
{
	int empty_offs, check_len;
	uint8_t *p;
	empty_offs = ALIGN(offs + 1, c->min_io_size);
	check_len = c->leb_size - empty_offs;
	p = buf + empty_offs - offs;
	return is_empty(p, check_len);
}