qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 03/23] chardev/baum: Use definitions to avoid dynamic stack a


From: Samuel Thibault
Subject: Re: [PATCH 03/23] chardev/baum: Use definitions to avoid dynamic stack allocation
Date: Wed, 5 May 2021 23:39:52 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Marc-André Lureau, le jeu. 06 mai 2021 01:27:25 +0400, a ecrit:
>     @@ -408,7 +408,7 @@ static int baum_eat_packet(BaumChardev *baum, const
>     uint8_t *buf, int len)
>              }
>              timer_del(baum->cellCount_timer);
> 
>     -        memset(zero, 0, sizeof(zero));
>     +        memset(zero, 0, baum->x * baum->y);
> 
> 
> eh, I would have left the sizeof(zero)..

I was wondering too, but below this it's clear that only
baum->x * baum->y is getting used.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]