File 0026-library-fixing-uninitialized-variable-pos-in-whattim.patch of Package procps.openSUSE_Leap_42.3_Update

From 38cbeedeb7dc94c95482343e547addc1748344b0 Mon Sep 17 00:00:00 2001
From: Jaromir Capik <jcapik@redhat.com>
Date: Thu, 2 Jan 2014 18:21:31 +0100
Subject: [PATCH] library: fixing uninitialized variable 'pos' in whattime.c

---
 proc/whattime.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git proc/whattime.c proc/whattime.c
index 9d6abb3..eb345fb 100644
--- proc/whattime.c
+++ proc/whattime.c
@@ -58,6 +58,8 @@ char *sprint_uptime(int human_readable) {
     realtime = localtime(&realseconds);
     pos = sprintf(buf, " %02d:%02d:%02d ",
       realtime->tm_hour, realtime->tm_min, realtime->tm_sec);
+  } else {
+    pos = 0;
   }
 
 /* read and calculate the amount of uptime */
-- 
1.7.9.2

openSUSE Build Service is sponsored by