[med-svn] [htslib] 01/08: Use the exact type in realloc(N * sizeof(TYPE*))

Charles Plessy plessy at moszumanska.debian.org
Wed Dec 4 04:42:18 UTC 2013


This is an automated email from the git hooks/post-receive script.

plessy pushed a commit to branch debian/unstable
in repository htslib.

commit 626a888b16e06b97a792cfc654bfd9e6a35568d5
Author: John Marshall <jm18 at sanger.ac.uk>
Date:   Fri Nov 22 15:28:24 2013 +0000

    Use the exact type in realloc(N * sizeof(TYPE*))
    
    This one was missed previously as it's not used within htslib.
---
 htslib/klist.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/htslib/klist.h b/htslib/klist.h
index 984bb10..293a6e0 100644
--- a/htslib/klist.h
+++ b/htslib/klist.h
@@ -52,7 +52,7 @@
 		--mp->cnt;														\
 		if (mp->n == mp->max) {											\
 			mp->max = mp->max? mp->max<<1 : 16;							\
-			mp->buf = realloc(mp->buf, sizeof(void*) * mp->max);		\
+			mp->buf = realloc(mp->buf, sizeof(kmptype_t *) * mp->max);	\
 		}																\
 		mp->buf[mp->n++] = p;											\
 	}

-- 
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/htslib.git



More information about the debian-med-commit mailing list