Skip to content

Commit

Permalink
remove redundant check for negative unsigned integer
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrauch committed Jan 21, 2024
1 parent 0e53d74 commit 05d9b29
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions common/pthreads_cross.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,10 @@ void ms_to_timespec(struct timespec *ts, unsigned int ms)

unsigned int timespec_to_ms(const struct timespec *abstime)
{
DWORD t;

if (abstime == NULL)
return INFINITE;

t = ((abstime->tv_sec - time(NULL)) * 1000) + (abstime->tv_nsec / 1000000);
if (t < 0)
t = 1;
return t;
return ((abstime->tv_sec - time(NULL)) * 1000) + (abstime->tv_nsec / 1000000);
}

unsigned int pcthread_get_num_procs()
Expand Down

0 comments on commit 05d9b29

Please sign in to comment.