Re: [PATCH] progress: pay attention to (customized) delay time

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

 



Carlo Marcelo Arenas Belón <carenas@xxxxxxxxx> writes:

> On Mon, Aug 25, 2025 at 10:00:25AM -0800, Junio C Hamano wrote:
>> 
>> >  	struct strbuf *counters_sb = &progress->counters_sb;
>> >  	int show_update = 0;
>> > +	sig_atomic_t update = progress_update;
>> 
>> It is somewhat misleading to use sig_atomic_t for "update", which is
>> never updated via the signal handler.  It confused me a bit during
>> my initial reading.  If it were
>> 
>> 	int update = !!progress_update;
>> 
>> it would have made it more obvious what is going on, at least to me.
>
> In that case, I would suggest doing instead:
>
>   bool update = !!progress_update;

Any conventional type we would use for "is it set or not?" that is
not sig_atomic_t is good enough in this context.

The fact that we started adopting "bool" in new code is orthogonal
and a bit off the point.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux