mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
src/Mayaqua/Object.c: remove redundant conditionals
found by PVS analyzer src/Mayaqua/Object.c 318 warn V547 Expression 'c->Ready == 0' is always false. src/Mayaqua/Object.c 348 warn V547 Expression 'c->Ready == 0' is always false. src/Mayaqua/Object.c 383 warn V547 Expression 'c->Ready == 0' is always false.
This commit is contained in:
parent
60bb1c34de
commit
564ca6087f
@ -314,16 +314,9 @@ UINT Count(COUNTER *c)
|
||||
}
|
||||
|
||||
Lock(c->lock);
|
||||
{
|
||||
if (c->Ready == false)
|
||||
{
|
||||
ret = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = c->c;
|
||||
}
|
||||
}
|
||||
Unlock(c->lock);
|
||||
|
||||
return ret;
|
||||
@ -344,17 +337,10 @@ UINT Inc(COUNTER *c)
|
||||
}
|
||||
|
||||
Lock(c->lock);
|
||||
{
|
||||
if (c->Ready == false)
|
||||
{
|
||||
ret = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
c->c++;
|
||||
ret = c->c;
|
||||
}
|
||||
}
|
||||
Unlock(c->lock);
|
||||
|
||||
// KS
|
||||
@ -379,12 +365,6 @@ UINT Dec(COUNTER *c)
|
||||
}
|
||||
|
||||
Lock(c->lock);
|
||||
{
|
||||
if (c->Ready == false)
|
||||
{
|
||||
ret = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (c->c != 0)
|
||||
{
|
||||
@ -396,7 +376,6 @@ UINT Dec(COUNTER *c)
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Unlock(c->lock);
|
||||
|
||||
// KS
|
||||
|
Loading…
Reference in New Issue
Block a user