Mercurial > code
changeset 104:c66fb578a7c4
Cosmetic
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 17 Jan 2012 13:51:33 +0100 |
parents | 7fefa3a34461 |
children | eac1f370910a |
files | pack.c |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/pack.c Tue Jan 17 13:38:54 2012 +0100 +++ b/pack.c Tue Jan 17 13:51:33 2012 +0100 @@ -221,7 +221,6 @@ } } - /* -------------------------------------------------------- * public functions * -------------------------------------------------------- */ @@ -374,7 +373,7 @@ pack_vfread(int ptype, FILE *fp, const char *fmt, va_list ap) { const char *p; - void *ptr; + uint8_t *ptr; size_t tocopy; ConvertFn convert; @@ -397,11 +396,11 @@ if (nelem == 0) continue; - if ((ptr = va_arg(ap, void *)) == NULL) + if ((ptr = va_arg(ap, uint8_t *)) == NULL) continue; for (i = 0; i < nelem; ++i) { - fread((char *) ptr + (tocopy * i), tocopy, 1, fp); + fread(&ptr[tocopy * i], tocopy, 1, fp); /* Convert if needed */ convert = pack_getconvert_by_tok(tok);