From db71b4359b9dff7c8c887dbcc85de87040334095 Mon Sep 17 00:00:00 2001 From: pb Date: Wed, 6 Feb 2008 08:02:55 +0000 Subject: Update fix from rev 1.2. Submitted by: danny at cs.huji.ac.il (author) MFC after: 1 week --- sbin/iscontrol/misc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sbin') diff --git a/sbin/iscontrol/misc.c b/sbin/iscontrol/misc.c index d524f72..61ca247 100644 --- a/sbin/iscontrol/misc.c +++ b/sbin/iscontrol/misc.c @@ -158,7 +158,8 @@ char * bin2str(char *encoding, unsigned char *md, int blen) { int len; - unsigned char *dst, *ds, *cp; + char *dst, *ds; + unsigned char *cp; if(strncasecmp(encoding, "0x", 2) == 0) { char ofmt[5]; @@ -167,7 +168,7 @@ bin2str(char *encoding, unsigned char *md, int blen) dst = malloc(len + 3); strcpy(dst, encoding); ds = dst + 2; - cp = (char *)md; + cp = md; sprintf(ofmt, "%%02%c", encoding[1]); while(blen-- > 0) { sprintf(ds, ofmt, *cp++); @@ -183,7 +184,7 @@ bin2str(char *encoding, unsigned char *md, int blen) dst = malloc(len + 3); strcpy(dst, encoding); ds = dst + 2; - cp = (char *)md; + cp = md; b6 = 0; // to keep copiler happy. for(i = 0; i < blen; i++) { switch(i % 3) { -- cgit v1.1