[ofa-general] [PATCH] ibnetdiscover: fix types to avoid portability castings
Sasha Khapyorsky
sashak at voltaire.com
Sat Apr 25 07:42:24 PDT 2009
We did this before, but somehow it was lost in libibnetdisc patches.
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
.../libibnetdisc/include/infiniband/ibnetdisc.h | 4 ++--
infiniband-diags/src/ibnetdiscover.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h b/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h
index 8324ca9..4fe0f21 100644
--- a/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h
+++ b/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h
@@ -104,10 +104,10 @@ typedef struct port {
typedef struct chassis {
struct chassis *next;
uint64_t chassisguid;
- int chassisnum;
+ unsigned char chassisnum;
/* generic grouping by SystemImageGUID */
- int nodecount;
+ unsigned char nodecount;
ibnd_node_t *nodes;
/* specific to voltaire type nodes */
diff --git a/infiniband-diags/src/ibnetdiscover.c b/infiniband-diags/src/ibnetdiscover.c
index 2ca696e..e874fe4 100644
--- a/infiniband-diags/src/ibnetdiscover.c
+++ b/infiniband-diags/src/ibnetdiscover.c
@@ -205,12 +205,12 @@ out_ids(ibnd_node_t *node, int group, char *chname)
}
uint64_t
-out_chassis(ibnd_fabric_t *fabric, int chassisnum)
+out_chassis(ibnd_fabric_t *fabric, unsigned char chassisnum)
{
uint64_t guid;
- fprintf(f, "\nChassis %d", chassisnum);
- guid = ibnd_get_chassis_guid(fabric, (unsigned char) chassisnum);
+ fprintf(f, "\nChassis %u", chassisnum);
+ guid = ibnd_get_chassis_guid(fabric, chassisnum);
if (guid)
fprintf(f, " (guid 0x%" PRIx64 ")", guid);
fprintf(f, "\n");
--
1.6.1.2.319.gbd9e
More information about the general
mailing list