Use switch insted of if with enums in threadutil

Replace if statements with switch when using enums in threadutil.
This commit is contained in:
Fabrice Fontaine
2012-03-14 18:52:20 +01:00
parent 05fb3f8026
commit b7f83bb7c6
3 changed files with 20 additions and 9 deletions

View File

@@ -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;