Re: [RFC 4/7] rt-tests: cyclictest: Drop unnecessary variable "bufsize"

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

 



John Kacur <jkacur@xxxxxxxxxx> writes:

> On Thu, 14 Oct 2021, Punit Agrawal wrote:
>
>> From: Punit Agrawal <punit1.agrawal@xxxxxxxxxxxxx>
>> 
>> Two copies of "bufsize", initialised with the same value are declared
>> in enclosed blocks. Remove the redundant declaration.
>> 
>> Signed-off-by: Punit Agrawal <punit1.agrawal@xxxxxxxxxxxxx>
>> ---
>>  src/cyclictest/cyclictest.c | 1 -
>>  1 file changed, 1 deletion(-)
>> 
>> diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
>> index 721d242a1da0..9c67a3ce3034 100644
>> --- a/src/cyclictest/cyclictest.c
>> +++ b/src/cyclictest/cyclictest.c
>> @@ -2054,7 +2054,6 @@ int main(int argc, char **argv)
>>  			memset(stat->values, 0, bufsize);
>>  			par->bufmsk = VALBUF_SIZE - 1;
>>  			if (smi) {
>> -				int bufsize = VALBUF_SIZE * sizeof(long);
>>  				stat->smis = threadalloc(bufsize, node);
>>  				if (!stat->smis)
>>  					goto outall;
>> -- 
>> 2.32.0
>> 
>> 
> NACK: two different scopes, two different variables.

If they had different values or if the inner scope was not dependent
(nested) I would agree.

But no strong opinion - I'll drop this one.



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux