diff options
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/hdf5-file.c | 11 | ||||
-rw-r--r-- | libcrystfel/src/hdf5-file.h | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c index 923d27ca..0d041e01 100644 --- a/libcrystfel/src/hdf5-file.c +++ b/libcrystfel/src/hdf5-file.c @@ -380,10 +380,9 @@ static int read_hdf5_data_into_buffer(struct hdfile *f, char *path, int line, int get_peaks(struct image *image, struct hdfile *f, const char *p, - int cxidb_format, struct filename_plus_event *fpe) + int cxi_format, struct filename_plus_event *fpe) { - - if ( cxidb_format ) { + if ( cxi_format ) { char *path_n; char *path_x; @@ -404,10 +403,12 @@ int get_peaks(struct image *image, struct hdfile *f, const char *p, path_y=malloc((strlen(p)+strlen("/peakYPosRaw")+1)*sizeof(char)); path_i=malloc((strlen(p)+strlen("/peakIntensity")+1)*sizeof(char)); - if ( fpe != NULL && fpe->ev != NULL && fpe->ev->dim_entries != NULL ) { + if ( (fpe != NULL) && (fpe->ev != NULL) + && (fpe->ev->dim_entries != NULL) ) + { line = fpe->ev->dim_entries[0]; } else { - ERROR("CXIDB peak list format selected," + ERROR("CXI format peak list format selected," "but file has no event structure"); free(path_n); free(path_x); diff --git a/libcrystfel/src/hdf5-file.h b/libcrystfel/src/hdf5-file.h index 93ef1d95..84b20798 100644 --- a/libcrystfel/src/hdf5-file.h +++ b/libcrystfel/src/hdf5-file.h @@ -80,7 +80,7 @@ extern int hdfile_is_scalar(struct hdfile *f, const char *name, int verbose); char *hdfile_get_string_value(struct hdfile *f, const char *name, struct event* ev); extern int get_peaks(struct image *image, struct hdfile *f, const char *p, - int cxidb_format, struct filename_plus_event *fpe); + int cxi_format, struct filename_plus_event *fpe); extern double get_value(struct hdfile *f, const char *name); extern double get_ev_based_value(struct hdfile *f, const char *name, |