diff options
author | vkalintiris <vasilis@netdata.cloud> | 2022-10-09 16:38:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-09 16:38:49 +0300 |
commit | ccfbdb5c3d253a391cab0561dfc8a524b93d2e7c (patch) | |
tree | cf5e43618e40801db736604e5c8d4c4e6c0f9f65 /daemon | |
parent | 284d5450ec938b667db9985aca6d3cd02b96487f (diff) |
Remove extern from function declared in headers. (#13790)
By default functions are declared as extern in C/C++ headers. The goal
of this PR is to reduce the wall of text that many headers have and,
more importantly, to make the declaration of extern'd variables - of
which we have many dispersed in various places - easily and quickly
identifiable.
Automatically generated with:
$ git grep -l '^extern.*(' '**.h' | \
grep -v libjudy | \
grep -v 'sqlite3.h' | \
xargs sed -i -e 's/extern \(.*(.*$\)/\1/'
This is a NFC.
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/analytics.h | 24 | ||||
-rw-r--r-- | daemon/buildinfo.h | 8 | ||||
-rw-r--r-- | daemon/commands.h | 4 | ||||
-rw-r--r-- | daemon/daemon.h | 10 | ||||
-rw-r--r-- | daemon/global_statistics.h | 12 | ||||
-rw-r--r-- | daemon/main.h | 8 | ||||
-rw-r--r-- | daemon/signals.h | 12 | ||||
-rw-r--r-- | daemon/unit_test.h | 22 |
8 files changed, 50 insertions, 50 deletions
diff --git a/daemon/analytics.h b/daemon/analytics.h index 76c1cbb7e0..d1ffcec187 100644 --- a/daemon/analytics.h +++ b/daemon/analytics.h @@ -69,18 +69,18 @@ struct analytics_data { uint8_t dashboard_hits; }; -extern void analytics_get_data(char *name, BUFFER *wb); -extern void set_late_global_environment(void); -extern void analytics_free_data(void); -extern void set_global_environment(void); -extern void send_statistics(const char *action, const char *action_result, const char *action_data); -extern void analytics_log_shell(void); -extern void analytics_log_json(void); -extern void analytics_log_prometheus(void); -extern void analytics_log_dashboard(void); -extern void analytics_gather_mutable_meta_data(void); -extern void analytics_report_oom_score(long long int score); -extern void get_system_timezone(void); +void analytics_get_data(char *name, BUFFER *wb); +void set_late_global_environment(void); +void analytics_free_data(void); +void set_global_environment(void); +void send_statistics(const char *action, const char *action_result, const char *action_data); +void analytics_log_shell(void); +void analytics_log_json(void); +void analytics_log_prometheus(void); +void analytics_log_dashboard(void); +void analytics_gather_mutable_meta_data(void); +void analytics_report_oom_score(long long int score); +void get_system_timezone(void); extern struct analytics_data analytics_data; diff --git a/daemon/buildinfo.h b/daemon/buildinfo.h index 542a0e92e0..d3b439fc39 100644 --- a/daemon/buildinfo.h +++ b/daemon/buildinfo.h @@ -3,12 +3,12 @@ #ifndef NETDATA_BUILDINFO_H #define NETDATA_BUILDINFO_H 1 -extern void print_build_info(void); +void print_build_info(void); -extern void print_build_info_json(void); +void print_build_info_json(void); -extern char *get_value_from_key(char *buffer, char *key); +char *get_value_from_key(char *buffer, char *key); -extern void get_install_type(char **install_type, char **prebuilt_arch, char **prebuilt_dist); +void get_install_type(char **install_type, char **prebuilt_arch, char **prebuilt_dist); #endif // NETDATA_BUILDINFO_H diff --git a/daemon/commands.h b/daemon/commands.h index 1253e2dc1c..f0e38ce93f 100644 --- a/daemon/commands.h +++ b/daemon/commands.h @@ -76,7 +76,7 @@ typedef struct command_info { typedef void (command_lock_t) (unsigned index); cmd_status_t execute_command(cmd_t idx, char *args, char **message); -extern void commands_init(void); -extern void commands_exit(void); +void commands_init(void); +void commands_exit(void); #endif //NETDATA_COMMANDS_H diff --git a/daemon/daemon.h b/daemon/daemon.h index bec3df9fc5..2a8a58ec66 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -3,14 +3,14 @@ #ifndef NETDATA_DAEMON_H #define NETDATA_DAEMON_H 1 -extern int become_user(const char *username, int pid_fd); +int become_user(const char *username, int pid_fd); -extern int become_daemon(int dont_fork, const char *user); +int become_daemon(int dont_fork, const char *user); -extern void netdata_cleanup_and_exit(int i); -extern void send_statistics(const char *action, const char *action_result, const char *action_data); +void netdata_cleanup_and_exit(int i); +void send_statistics(const char *action, const char *action_result, const char *action_data); -extern void get_netdata_execution_path(void); +void get_netdata_execution_path(void); extern char pidfile[]; extern char exepath[]; diff --git a/daemon/global_statistics.h b/daemon/global_statistics.h index 8d4a63d085..a54610b0ed 100644 --- a/daemon/global_statistics.h +++ b/daemon/global_statistics.h @@ -8,17 +8,17 @@ // ---------------------------------------------------------------------------- // global statistics -extern void rrdr_query_completed(uint64_t db_points_read, uint64_t result_points_generated); -extern void sqlite3_query_completed(bool success, bool busy, bool locked); -extern void sqlite3_row_completed(void); +void rrdr_query_completed(uint64_t db_points_read, uint64_t result_points_generated); +void sqlite3_query_completed(bool success, bool busy, bool locked); +void sqlite3_row_completed(void); -extern void finished_web_request_statistics(uint64_t dt, +void finished_web_request_statistics(uint64_t dt, uint64_t bytes_received, uint64_t bytes_sent, uint64_t content_size, uint64_t compressed_content_size); -extern uint64_t web_client_connected(void); -extern void web_client_disconnected(void); +uint64_t web_client_connected(void); +void web_client_disconnected(void); #endif /* NETDATA_GLOBAL_STATISTICS_H */ diff --git a/daemon/main.h b/daemon/main.h index 63d6c5a095..a4e2b3aa71 100644 --- a/daemon/main.h +++ b/daemon/main.h @@ -22,9 +22,9 @@ struct option_def { const char *default_value; }; -extern void cancel_main_threads(void); -extern int killpid(pid_t pid); -extern void netdata_cleanup_and_exit(int ret) NORETURN; -extern void send_statistics(const char *action, const char *action_result, const char *action_data); +void cancel_main_threads(void); +int killpid(pid_t pid); +void netdata_cleanup_and_exit(int ret) NORETURN; +void send_statistics(const char *action, const char *action_result, const char *action_data); #endif /* NETDATA_MAIN_H */ diff --git a/daemon/signals.h b/daemon/signals.h index 3fa2b0f43f..12b1ed198b 100644 --- a/daemon/signals.h +++ b/daemon/signals.h @@ -3,11 +3,11 @@ #ifndef NETDATA_SIGNALS_H #define NETDATA_SIGNALS_H 1 -extern void signals_init(void); -extern void signals_block(void); -extern void signals_unblock(void); -extern void signals_restore_SIGCHLD(void); -extern void signals_reset(void); -extern void signals_handle(void) NORETURN; +void signals_init(void); +void signals_block(void); +void signals_unblock(void); +void signals_restore_SIGCHLD(void); +void signals_reset(void); +void signals_handle(void) NORETURN; #endif //NETDATA_SIGNALS_H diff --git a/daemon/unit_test.h b/daemon/unit_test.h index 2d2533afed..dab1368b6c 100644 --- a/daemon/unit_test.h +++ b/daemon/unit_test.h @@ -3,18 +3,18 @@ #ifndef NETDATA_UNIT_TEST_H #define NETDATA_UNIT_TEST_H 1 -extern int unit_test_storage(void); -extern int unit_test(long delay, long shift); -extern int run_all_mockup_tests(void); -extern int unit_test_str2ld(void); -extern int unit_test_buffer(void); -extern int unit_test_static_threads(void); -extern int test_sqlite(void); -extern int unit_test_bitmap256(void); +int unit_test_storage(void); +int unit_test(long delay, long shift); +int run_all_mockup_tests(void); +int unit_test_str2ld(void); +int unit_test_buffer(void); +int unit_test_static_threads(void); +int test_sqlite(void); +int unit_test_bitmap256(void); #ifdef ENABLE_DBENGINE -extern int test_dbengine(void); -extern void generate_dbengine_dataset(unsigned history_seconds); -extern void dbengine_stress_test(unsigned TEST_DURATION_SEC, unsigned DSET_CHARTS, unsigned QUERY_THREADS, +int test_dbengine(void); +void generate_dbengine_dataset(unsigned history_seconds); +void dbengine_stress_test(unsigned TEST_DURATION_SEC, unsigned DSET_CHARTS, unsigned QUERY_THREADS, unsigned RAMP_UP_SECONDS, unsigned PAGE_CACHE_MB, unsigned DISK_SPACE_MB); #endif |