summaryrefslogtreecommitdiffstats
path: root/sbin/iscontrol
diff options
context:
space:
mode:
authorpb <pb@FreeBSD.org>2008-02-06 08:02:55 +0000
committerpb <pb@FreeBSD.org>2008-02-06 08:02:55 +0000
commitdb71b4359b9dff7c8c887dbcc85de87040334095 (patch)
treea81096144d2f9a2a305ae9e5ae053e81e673c40e /sbin/iscontrol
parentbd06cb56ab7f07dd1d6e23daa8b00a6b75f2b37c (diff)
downloadFreeBSD-src-db71b4359b9dff7c8c887dbcc85de87040334095.zip
FreeBSD-src-db71b4359b9dff7c8c887dbcc85de87040334095.tar.gz
Update fix from rev 1.2.
Submitted by: danny at cs.huji.ac.il (author) MFC after: 1 week
Diffstat (limited to 'sbin/iscontrol')
-rw-r--r--sbin/iscontrol/misc.c7
1 files changed, 4 insertions, 3 deletions
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) {
OpenPOWER on IntegriCloud