From b39d7a2015dc5225f92b859ba51c78ae09824074 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Tue, 6 Jan 2004 23:02:40 +0000 Subject: [PATCH] change valstr to use 16bit integer --- ipmitool/include/ipmitool/helper.h | 4 ++-- ipmitool/lib/helper.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ipmitool/include/ipmitool/helper.h b/ipmitool/include/ipmitool/helper.h index b821912..4991561 100644 --- a/ipmitool/include/ipmitool/helper.h +++ b/ipmitool/include/ipmitool/helper.h @@ -38,10 +38,10 @@ #define IPMI_HELPER_H struct valstr { - unsigned char val; + unsigned short val; const char * str; }; -const char * val2str(unsigned char val, const struct valstr * vs); +const char * val2str(unsigned short val, const struct valstr * vs); unsigned short buf2short(unsigned char * buf); unsigned long buf2long(unsigned char * buf); diff --git a/ipmitool/lib/helper.c b/ipmitool/lib/helper.c index f68242c..8a89ea4 100644 --- a/ipmitool/lib/helper.c +++ b/ipmitool/lib/helper.c @@ -86,7 +86,7 @@ void printbuf(unsigned char * buf, int len, char * desc) printf("\n"); } -const char * val2str(unsigned char val, const struct valstr *vs) +const char * val2str(unsigned short val, const struct valstr *vs) { static char un_str[16]; int i = 0;