Change the return value of two functions from 'void' into 'int'
authorBart Van Assche <bvanassche@acm.org>
Sun, 20 Sep 2020 23:27:58 +0000 (16:27 -0700)
committerBart Van Assche <bvanassche@acm.org>
Sun, 20 Sep 2020 23:28:59 +0000 (16:28 -0700)
This patch does not change any functionality but makes the next patch in
this series easier to read.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
stat.c
stat.h
steadystate.c
steadystate.h

diff --git a/stat.c b/stat.c
index 7f987c7f41370745b0b50acb992f21782ec4b5ad..eb40bd7f44bb7c4c40c84fc5c70fa9648f996772 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -2299,7 +2299,7 @@ void __show_run_stats(void)
        free(opt_lists);
 }
 
-void __show_running_run_stats(void)
+int __show_running_run_stats(void)
 {
        struct thread_data *td;
        unsigned long long *rt;
@@ -2350,6 +2350,8 @@ void __show_running_run_stats(void)
 
        free(rt);
        fio_sem_up(stat_sem);
+
+       return 0;
 }
 
 static bool status_file_disabled;
diff --git a/stat.h b/stat.h
index 0d14166632d873661ae020525a7723a5f6221856..6dd5ef743a0803b79d5652615dabba416c01dad3 100644 (file)
--- a/stat.h
+++ b/stat.h
@@ -319,7 +319,7 @@ extern void show_group_stats(struct group_run_stats *rs, struct buf_output *);
 extern bool calc_thread_status(struct jobs_eta *je, int force);
 extern void display_thread_status(struct jobs_eta *je);
 extern void __show_run_stats(void);
-extern void __show_running_run_stats(void);
+extern int __show_running_run_stats(void);
 extern void show_running_run_stats(void);
 extern void check_for_running_stats(void);
 extern void sum_thread_stats(struct thread_stat *dst, struct thread_stat *src, bool first);
index bd2f70dd3af1b6084994b2409ef6d7f862e2aac4..2e3da1db0cfb3de21c068d6b6f3d159f71c592ad 100644 (file)
@@ -196,7 +196,7 @@ static bool steadystate_deviation(uint64_t iops, uint64_t bw,
        return false;
 }
 
-void steadystate_check(void)
+int steadystate_check(void)
 {
        int i, j, ddir, prev_groupid, group_ramp_time_over = 0;
        unsigned long rate_time;
@@ -302,6 +302,7 @@ void steadystate_check(void)
                        }
                }
        }
+       return 0;
 }
 
 int td_steadystate_init(struct thread_data *td)
index 51472c4698c0cfd72233a62c34cd1226741138a8..bbb86fbb30a301299882e655e98b00c951cca8d5 100644 (file)
@@ -4,7 +4,7 @@
 #include "thread_options.h"
 
 extern void steadystate_free(struct thread_data *);
-extern void steadystate_check(void);
+extern int steadystate_check(void);
 extern void steadystate_setup(void);
 extern int td_steadystate_init(struct thread_data *);
 extern uint64_t steadystate_bw_mean(struct thread_stat *);