From 7f931c0e2bb8fdcdae0bb64921d3bff57b66f25c Mon Sep 17 00:00:00 2001 From: Josh Borrow <joshua.borrow@durham.ac.uk> Date: Tue, 2 Jun 2020 14:04:52 +0100 Subject: [PATCH] Removed incorrect use of pointer to first char in a string --- src/distributed_io.c | 3 +-- src/parallel_io.c | 5 ++--- src/serial_io.c | 3 +-- src/single_io.c | 3 +-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/distributed_io.c b/src/distributed_io.c index 000033b91a..a2e6e5f0f3 100644 --- a/src/distributed_io.c +++ b/src/distributed_io.c @@ -363,8 +363,7 @@ void write_output_distributed(struct engine* e, if (output_list) { /* Users could have specified a different Select Output scheme for each * snapshot. */ - output_list_get_current_select_output(output_list, - ¤t_selection_name[0]); + output_list_get_current_select_output(output_list, current_selection_name); } /* Print the relevant information and print status */ diff --git a/src/parallel_io.c b/src/parallel_io.c index 37999d01eb..994fe10094 100644 --- a/src/parallel_io.c +++ b/src/parallel_io.c @@ -1110,8 +1110,7 @@ void prepare_file(struct engine* e, const char* fileName, if (output_list) { /* Users could have specified a different Select Output scheme for each * snapshot. */ - output_list_get_current_select_output(output_list, - ¤t_selection_name[0]); + output_list_get_current_select_output(output_list, current_selection_name); } /* Print the relevant information and print status */ @@ -1788,7 +1787,7 @@ void write_output_parallel(struct engine* e, /* Users could have specified a different Select Output scheme for each * snapshot. */ output_list_get_current_select_output(output_list, - ¤t_selection_name[0]); + current_selection_name); } for (int i = 0; i < num_fields; ++i) { diff --git a/src/serial_io.c b/src/serial_io.c index 43de9c19a8..00d2f3c84d 100644 --- a/src/serial_io.c +++ b/src/serial_io.c @@ -930,8 +930,7 @@ void write_output_serial(struct engine* e, if (output_list) { /* Users could have specified a different Select Output scheme for each * snapshot. */ - output_list_get_current_select_output(output_list, - ¤t_selection_name[0]); + output_list_get_current_select_output(output_list, current_selection_name); } /* Compute offset in the file and total number of particles */ diff --git a/src/single_io.c b/src/single_io.c index 0f22ddeb2a..5560b90823 100644 --- a/src/single_io.c +++ b/src/single_io.c @@ -822,8 +822,7 @@ void write_output_single(struct engine* e, if (output_list) { /* Users could have specified a different Select Output scheme for each * snapshot. */ - output_list_get_current_select_output(output_list, - ¤t_selection_name[0]); + output_list_get_current_select_output(output_list, current_selection_name); } /* Print the relevant information and print status */ -- GitLab