libibumad: Add UMAD_MAX_DEVICES define

Signed-off-by: Hal Rosenstock <hal.rosenstock@gmail.com>

diff --git a/libibumad/include/infiniband/umad.h b/libibumad/include/infiniband/umad.h
index f11ecc2..7d97c25 100644
--- a/libibumad/include/infiniband/umad.h
+++ b/libibumad/include/infiniband/umad.h
@@ -46,6 +46,7 @@
 
 BEGIN_C_DECLS
 
+#define UMAD_MAX_DEVICES 20
 #define UMAD_ANY_PORT	0
 
 typedef struct ib_mad_addr {
diff --git a/libibumad/src/umad.c b/libibumad/src/umad.c
index 139634d..3713ffe 100644
--- a/libibumad/src/umad.c
+++ b/libibumad/src/umad.c
@@ -288,7 +288,7 @@ resolve_ca_port(char *ca_name, int *port)
 static char *
 resolve_ca_name(char *ca_name, int *best_port)
 {
-	static char names[20][UMAD_CA_NAME_LEN];
+	static char names[UMAD_MAX_DEVICES][UMAD_CA_NAME_LEN];
 	int phys_found = -1, port_found = 0, port, port_type;
 	int caidx, n;
 
