aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/image.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-01-03 11:15:00 +0100
committerThomas White <taw@physics.org>2019-01-03 11:15:00 +0100
commit9437d86af6a45a6a4b20b519d34f49bb3528538b (patch)
tree99c979aba6001b22dcd1c1be3642cf7b0ef3266c /libcrystfel/src/image.c
parent039af49621dff40316e3a4a553a82cfb6bf9b96d (diff)
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.
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r--libcrystfel/src/image.c4
1 files changed, 2 insertions, 2 deletions
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;