Skip to content
Snippets Groups Projects
Commit 502af618 authored by Marek Behún's avatar Marek Behún Committed by Tom Rini
Browse files

linux/time.h: Remove dead code


Since
  rem = ((long) *tim_p) % SECSPERDAY;
the second while cycle
  while (rem >= SECSPERDAY)
is dead.

Reported-by: Coverity (CID: 167334)
Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
parent b16339e2
No related branches found
No related tags found
No related merge requests found
...@@ -93,11 +93,6 @@ _DEFUN (localtime_r, (tim_p, res), ...@@ -93,11 +93,6 @@ _DEFUN (localtime_r, (tim_p, res),
rem += SECSPERDAY; rem += SECSPERDAY;
--days; --days;
} }
while (rem >= SECSPERDAY)
{
rem -= SECSPERDAY;
++days;
}
/* compute hour, min, and sec */ /* compute hour, min, and sec */
res->tm_hour = (int) (rem / SECSPERHOUR); res->tm_hour = (int) (rem / SECSPERHOUR);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment