]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
linux/time.h: Remove dead code
authorMarek BehĂșn <marek.behun@nic.cz>
Fri, 6 Oct 2017 13:04:56 +0000 (15:04 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 16 Oct 2017 13:42:51 +0000 (09:42 -0400)
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 <marek.behun@nic.cz>
include/linux/time.h

index bf12b99d37b964e7b867d666dac4c23ef277331f..b8d298eb4d68c9230472541a5a9a6a68683b51fa 100644 (file)
@@ -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);