Skip to content

Commit

Permalink
linux/time.h: Remove dead code
Browse files Browse the repository at this point in the history
Since
  rem = ((long) *tim_p) % SECSPERDAY;
the second while cycle
  while (rem >= SECSPERDAY)
is dead.

Reported-by: Coverity (CID: 167334)
Signed-off-by: Marek Behun <[email protected]>
  • Loading branch information
elkablo authored and trini committed Oct 16, 2017
1 parent b16339e commit 502af61
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions include/linux/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ _DEFUN (localtime_r, (tim_p, res),
rem += SECSPERDAY;
--days;
}
while (rem >= SECSPERDAY)
{
rem -= SECSPERDAY;
++days;
}

/* compute hour, min, and sec */
res->tm_hour = (int) (rem / SECSPERHOUR);
Expand Down

0 comments on commit 502af61

Please sign in to comment.