This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC v4 01/24] sunrpc/clnt_udp: Ensure total_deadline is initalised


Even though total_deadline won't be accessed uninitalised GCC can still
complain that it is accessed unitalised, to avod those errors let's make
sure we initalise it to 0.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 sunrpc/clnt_udp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c
index c2436e3ebcc..311b1734733 100644
--- a/sunrpc/clnt_udp.c
+++ b/sunrpc/clnt_udp.c
@@ -290,7 +290,7 @@ clntudp_call (/* client handle */
   int anyup;			/* any network interface up */
 
   struct deadline_current_time current_time = __deadline_current_time ();
-  struct deadline total_deadline; /* Determined once by overall timeout.  */
+  struct deadline total_deadline = { 0 }; /* Determined once by overall timeout.  */
   struct deadline response_deadline; /* Determined anew for each query.  */
 
   /* Choose the timeout value.  For non-sending usage (xargs == NULL),
-- 
2.22.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]