All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] linux/time.h: Remove dead code
@ 2017-10-06 13:04 Marek Behún
  2017-10-06 13:04 ` [U-Boot] [PATCH 2/4] fs: btrfs: Fix usage of uninitialized variables Marek Behún
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Marek Behún @ 2017-10-06 13:04 UTC (permalink / raw)
  To: u-boot

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 | 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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-10-17  0:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-06 13:04 [U-Boot] [PATCH 1/4] linux/time.h: Remove dead code Marek Behún
2017-10-06 13:04 ` [U-Boot] [PATCH 2/4] fs: btrfs: Fix usage of uninitialized variables Marek Behún
     [not found]   ` <99f56d19-544c-4604-4f82-bd7a9a1e45b6@comcast.net>
2017-10-06 14:28     ` Marek Behún
2017-10-17  0:47   ` [U-Boot] [U-Boot, " Tom Rini
2017-10-06 13:04 ` [U-Boot] [PATCH 3/4] fs: btrfs: Fix printf length modifier Marek Behún
2017-10-06 13:14   ` Marek Behún
2017-10-06 14:23     ` Tom Rini
2017-10-06 13:04 ` [U-Boot] [PATCH 4/4] fs: btrfs: Remove a foreign language note Marek Behún
2017-10-17  0:47   ` [U-Boot] [U-Boot, " Tom Rini
2017-10-17  0:47 ` [U-Boot] [U-Boot,1/4] linux/time.h: Remove dead code Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.