From d2d3c7e02b7e6404f26d0203a1be5ac90dfd8031 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 30 Nov 2012 00:56:31 +1100 Subject: [PATCH] use consistent type in sizeof and ultimate type cast --- bin/tests/dst/t_dst.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/tests/dst/t_dst.c b/bin/tests/dst/t_dst.c index f2b644bb3a..75a2a40ff1 100644 --- a/bin/tests/dst/t_dst.c +++ b/bin/tests/dst/t_dst.c @@ -631,7 +631,7 @@ sig_fromfile(char *path, isc_buffer_t *iscbuf) { return(1); } - buf = (char *) malloc((sb.st_size + 1) * sizeof(unsigned char)); + buf = (char *) malloc((sb.st_size + 1) * sizeof(char)); if (buf == NULL) { t_info("malloc failed, errno == %d\n", errno); close(fd); @@ -726,7 +726,7 @@ t2_sigchk(char *datapath, char *sigpath, char *keyname, return; } - data = (unsigned char *) malloc(sb.st_size * sizeof(char)); + data = (unsigned char *) malloc(sb.st_size * sizeof(unsigned char)); if (data == NULL) { t_info("t2_sigchk: malloc failed %d\n", errno); ++*nprobs;