[PATCH 17/34] utmpdump: assigned values are never read [clang-analyzer]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 login-utils/utmpdump.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/login-utils/utmpdump.c b/login-utils/utmpdump.c
index 3febeaf..8b6f17d 100644
--- a/login-utils/utmpdump.c
+++ b/login-utils/utmpdump.c
@@ -252,7 +252,7 @@ static void undump(FILE *in, FILE *out)
 	char s_addr[16], s_time[29], *linestart, *line;
 	int count = 0;
 
-	line = linestart = xmalloc(1024 * sizeof(*linestart));
+	linestart = xmalloc(1024 * sizeof(*linestart));
 	s_addr[15] = 0;
 	s_time[28] = 0;
 
@@ -266,7 +266,7 @@ static void undump(FILE *in, FILE *out)
 		line += gettok(line, ut.ut_line, sizeof(ut.ut_line), 1);
 		line += gettok(line, ut.ut_host, sizeof(ut.ut_host), 1);
 		line += gettok(line, s_addr, sizeof(s_addr) - 1, 1);
-		line += gettok(line, s_time, sizeof(s_time) - 1, 0);
+		gettok(line, s_time, sizeof(s_time) - 1, 0);
 
 		ut.ut_addr = inet_addr(s_addr);
 		ut.ut_time = strtotime(s_time);
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux