[U-Boot] [PATCH 1/4] linux/time.h: Remove dead code

Marek BehĂșn marek.behun at nic.cz
Fri Oct 6 13:04:56 UTC 2017


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 at nic.cz>
---
 include/linux/time.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/include/linux/time.h b/include/linux/time.h
index bf12b99d37..b8d298eb4d 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -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);
-- 
2.13.6



More information about the U-Boot mailing list