This is the mail archive of the libc-hacker@cygnus.com 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]

Patch to fix recent clnt_udp change



With the current glibc CVS version I get the following error:
clnt_udp.c:270: warning: `anyup' might be used uninitialized in this function

Looking at the code, the warning is justified, anyup isn't initialized 
at all:-(.

I'm appending a patch.

Andreas

1999-04-15  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* sunrpc/clnt_udp.c (clntudp_call): Initialize anyup.

--- sunrpc/clnt_udp.c.~1~	Thu Apr 15 08:47:26 1999
+++ sunrpc/clnt_udp.c	Thu Apr 15 18:05:56 1999
@@ -267,7 +267,7 @@
   bool_t ok;
   int nrefreshes = 2;		/* number of times to refresh cred */
   struct timeval timeout;
-  int anyup;			/* any network interface up */
+  int anyup = 0;		/* any network interface up */
 
   if (cu->cu_total.tv_usec == -1)
     {

-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de


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