aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/hdf5-file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c
index b9eaf374..7d2d8b5b 100644
--- a/libcrystfel/src/hdf5-file.c
+++ b/libcrystfel/src/hdf5-file.c
@@ -2462,7 +2462,7 @@ static herr_t parse_file_event_structure(hid_t loc_id, char *name,
truncated_path = strdup(substituted_path);
ph_loc = strstr(substituted_path,"%");
if ( ph_loc != NULL) {
- strncpy(&truncated_path[ph_loc-substituted_path],"\0",1);
+ truncated_path[ph_loc-substituted_path] = '\0';
}
herrt_iterate = 0;
@@ -2482,8 +2482,9 @@ static herr_t parse_file_event_structure(hid_t loc_id, char *name,
return -1;
}
- if ( pp->curr_event->path_length == pp->path_dim &&
- object_info.type == H5O_TYPE_DATASET ) {
+ if ( pp->curr_event->path_length == pp->path_dim
+ && object_info.type == H5O_TYPE_DATASET )
+ {
int fail_append;