From a8f6209b59df897d0aa5d398a0ee8d54e1df3a81 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 18 Sep 2014 16:32:43 +0200 Subject: Fussiness --- libcrystfel/src/hdf5-file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libcrystfel/src/hdf5-file.c') diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c index 2c8a0736..f5eaef02 100644 --- a/libcrystfel/src/hdf5-file.c +++ b/libcrystfel/src/hdf5-file.c @@ -512,11 +512,9 @@ int hdf5_write_image(const char *filename, struct image *image, char *element) hsize_t size[2]; char *path, *group = NULL, *object = NULL; - int fail; path = locations[li].location; - fail = split_group_and_object(path, &group, &object); - if ( fail ) { + if ( split_group_and_object(path, &group, &object) ) { ERROR("Error while determining write locations " "for file: %s\n", filename); return 1; @@ -537,6 +535,7 @@ int hdf5_write_image(const char *filename, struct image *image, char *element) H5Fclose(fh); return 1; } + } else { gh = H5Gopen2(fh, group, H5P_DEFAULT); } -- cgit v1.2.3