ib-diags: fix portnum being off by 1
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 3 Mar 2009 21:17:59 +0000 (21:17 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 3 Mar 2009 21:17:59 +0000 (21:17 +0000)
Relevent fix has been submitted upstream, but apply this to svn until ib-diags are updated.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2009 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

tools/infiniband-diags/src/ibstat.c

index 7985be1..41faea8 100644 (file)
@@ -146,7 +146,7 @@ ca_stat(char *ca_name, int portnum, int no_ports)
        if (no_ports)
                return 0;
 
-       for (portnum = 0; portnum <= ca.numports; portnum++)
+       for (portnum = 0; portnum < ca.numports; portnum++)
                port_dump(ca.ports[portnum], 0);
 
        return 0;