The assignment under pointed offset was put next to declaration of local variables. This might be quite confusing as the assignment looks like duplicated declaration of offset variable.
Signed-off-by: Krzysztof Kozlowski <k...@kernel.org> --- chardev/char.c | 1 + 1 file changed, 1 insertion(+) diff --git a/chardev/char.c b/chardev/char.c index a2571409bf65..b9343e03b9ec 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -104,6 +104,7 @@ static int qemu_chr_fe_write_buffer(Chardev *s, { const ChardevClass *cc = CHARDEV_GET_CLASS(s); int res = 0; + *offset = 0; qemu_mutex_lock(&s->chr_write_lock); -- 2.9.3