Use switch insted of if with enums in threadutil
Replace if statements with switch when using enums in threadutil.
This commit is contained in:
@@ -133,9 +133,10 @@ static int CalculateEventTime(
|
||||
|
||||
assert( timeout != NULL );
|
||||
|
||||
if (type == (TimeoutType)ABS_SEC)
|
||||
switch (type) {
|
||||
case ABS_SEC:
|
||||
return 0;
|
||||
else /*if (type == REL_SEC) */{
|
||||
default: /* REL_SEC) */
|
||||
time(&now);
|
||||
( *timeout ) += now;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user