From 9437d86af6a45a6a4b20b519d34f49bb3528538b Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 3 Jan 2019 11:15:00 +0100 Subject: Use gzclose() instead of gzclose_r() The only downside to this is that the zlib library will be twice the size if statically linked into libcrystfel. Since we don't anticipate much use for static linking, and since the extra space is unlikely to be a serious problem anyway, this seems fine. --- libcrystfel/src/image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libcrystfel/src/image.c') diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index 26d48007..63fd54f9 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -675,7 +675,7 @@ static float *read_cbf_data(struct imagefile *f, int *w, int *h, cbf_handle *pcb fh = fmemopen(buf, len, "rb"); if ( fh == NULL ) return NULL; - gzclose_r(gzfh); + gzclose(gzfh); } else { /* Don't know how we ended up here */ @@ -904,7 +904,7 @@ signed int is_cbfgz_file(const char *filename) gzfh = gzopen(filename, "rb"); if ( gzfh == NULL ) return -1; if ( gzgets(gzfh, line, 1024) == NULL ) return -1; - gzclose_r(gzfh); + gzclose(gzfh); if ( strstr(line, "CBF") == NULL ) { return 0; -- cgit v1.2.3