aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/image-cbf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libcrystfel/src/image-cbf.c b/libcrystfel/src/image-cbf.c
index 8a97cc6d..807141d3 100644
--- a/libcrystfel/src/image-cbf.c
+++ b/libcrystfel/src/image-cbf.c
@@ -263,7 +263,7 @@ static int convert_type(float *data_out, long nmemb_exp,
static float *read_cbf_data(const char *filename, int gz, int *w, int *h)
{
FILE *fh;
- void *buf = NULL;
+ char *buf = NULL;
char *rval;
size_t data_compressed_len = 0;
float *data_out = NULL;
@@ -285,7 +285,8 @@ static float *read_cbf_data(const char *filename, int gz, int *w, int *h)
} else {
gzFile gzfh;
- size_t len, len_read;
+ int len_read;
+ size_t len;
const size_t bufinc = 8*1024*1024; /* Allocate buffer in 8Mb chunks */
size_t bufsz = bufinc;