Changed check from > to != since using integer comparison
and some masks can use full range and hence be negative 

Signed-off-by: Hal Rosenstock <[email protected]>
---
diff --git a/infiniband-diags/src/saquery.c b/infiniband-diags/src/saquery.c
index 330c6aa..e1e2cfc 100644
--- a/infiniband-diags/src/saquery.c
+++ b/infiniband-diags/src/saquery.c
@@ -3,6 +3,7 @@
  * Copyright (c) 2004-2008 Voltaire, Inc. All rights reserved.
  * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ * Copyright (c) 2009 HNR Consulting. All rights reserved.
  *
  * Produced at Lawrence Livermore National Laboratory.
  * Written by Ira Weiny <[email protected]>.
@@ -922,7 +923,7 @@ static int parse_lid_and_ports(bind_handle_t h,
 
 #define cl_hton8(x) (x)
 #define CHECK_AND_SET_VAL(val, size, comp_with, target, name, mask) \
-       if ((int##size##_t) val > (int##size##_t) comp_with) { \
+       if ((int##size##_t) val != (int##size##_t) comp_with) { \
                target = cl_hton##size((uint##size##_t) val); \
                comp_mask |= IB_##name##_COMPMASK_##mask; \
        }
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to