]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
use consistent type in sizeof and ultimate type cast
authorMark Andrews <marka@isc.org>
Thu, 29 Nov 2012 13:56:31 +0000 (00:56 +1100)
committerMark Andrews <marka@isc.org>
Thu, 29 Nov 2012 13:58:59 +0000 (00:58 +1100)
bin/tests/dst/t_dst.c

index f2b644bb3a51c02c81a59124b04b8c9e0955f402..75a2a40ff1127e658434700f6337fbc5e9dc4321 100644 (file)
@@ -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;