[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-134-g5b7f916

mysql vizuser noreply at mpich.org
Sun May 5 11:56:43 CDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  5b7f9166920e16e02eeb2bc1c4153c9c9795eac0 (commit)
      from  d2338c2d853b9f6c20f882975df6883a858afc91 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/5b7f9166920e16e02eeb2bc1c4153c9c9795eac0

commit 5b7f9166920e16e02eeb2bc1c4153c9c9795eac0
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Sun May 5 11:54:59 2013 -0500

    Warning squash.
    
    No reviewer.

diff --git a/src/pm/hydra/utils/sock/sock.c b/src/pm/hydra/utils/sock/sock.c
index 0bdb63c..af04cba 100644
--- a/src/pm/hydra/utils/sock/sock.c
+++ b/src/pm/hydra/utils/sock/sock.c
@@ -499,8 +499,8 @@ HYD_status HYDU_sock_is_local(char *host, int *is_local)
 {
     struct hostent *ht;
     char *ip1 = NULL, *ip2 = NULL;
-    char buf1[INET_ADDRSTRLEN], buf2[INET_ADDRSTRLEN];
-    struct sockaddr_in *sa_ptr, sa;
+    char buf1[INET_ADDRSTRLEN];
+    struct sockaddr_in sa;
 
 #if defined(HAVE_GETIFADDRS)
     struct ifaddrs *ifaddr, *ifa;
@@ -546,13 +546,19 @@ HYD_status HYDU_sock_is_local(char *host, int *is_local)
 
     for (ifa = ifaddr; ifa; ifa = ifa->ifa_next) {
         if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET) {
+            struct sockaddr_in *sa_ptr;
+
             sa_ptr = (struct sockaddr_in *) ifa->ifa_addr;
 
 #if defined HAVE_INET_NTOP
-            ip2 = HYDU_strdup((char *)
-                              inet_ntop(AF_INET, (const void *) &(sa_ptr->sin_addr), buf2,
-                                        MAX_HOSTNAME_LEN));
-            HYDU_ASSERT(ip2, status);
+            {
+                char buf2[INET_ADDRSTRLEN];
+
+                ip2 = HYDU_strdup((char *)
+                                  inet_ntop(AF_INET, (const void *) &(sa_ptr->sin_addr), buf2,
+                                            MAX_HOSTNAME_LEN));
+                HYDU_ASSERT(ip2, status);
+            }
 #endif /* HAVE_INET_NTOP */
 
             if (!strcmp(ip1, ip2)) {

-----------------------------------------------------------------------

Summary of changes:
 src/pm/hydra/utils/sock/sock.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list