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 /web/server | |
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 'web/server')
-rw-r--r-- | web/server/static/static-threaded.h | 2 | ||||
-rw-r--r-- | web/server/web_client.h | 20 | ||||
-rw-r--r-- | web/server/web_client_cache.h | 8 | ||||
-rw-r--r-- | web/server/web_server.h | 14 |
4 files changed, 22 insertions, 22 deletions
diff --git a/web/server/static/static-threaded.h b/web/server/static/static-threaded.h index 5f4862e5b1..a8c5335ef5 100644 --- a/web/server/static/static-threaded.h +++ b/web/server/static/static-threaded.h @@ -5,6 +5,6 @@ #include "web/server/web_server.h" -extern void *socket_listen_main_static_threaded(void *ptr); +void *socket_listen_main_static_threaded(void *ptr); #endif //NETDATA_WEB_SERVER_STATIC_THREADED_H diff --git a/web/server/web_client.h b/web/server/web_client.h index 63a6f4b589..630d71a8a4 100644 --- a/web/server/web_client.h +++ b/web/server/web_client.h @@ -190,21 +190,21 @@ struct web_client { #endif }; -extern int web_client_permission_denied(struct web_client *w); +int web_client_permission_denied(struct web_client *w); -extern ssize_t web_client_send(struct web_client *w); -extern ssize_t web_client_receive(struct web_client *w); -extern ssize_t web_client_read_file(struct web_client *w); +ssize_t web_client_send(struct web_client *w); +ssize_t web_client_receive(struct web_client *w); +ssize_t web_client_read_file(struct web_client *w); -extern void web_client_process_request(struct web_client *w); -extern void web_client_request_done(struct web_client *w); +void web_client_process_request(struct web_client *w); +void web_client_request_done(struct web_client *w); -extern void buffer_data_options2string(BUFFER *wb, uint32_t options); +void buffer_data_options2string(BUFFER *wb, uint32_t options); -extern int mysendfile(struct web_client *w, char *filename); +int mysendfile(struct web_client *w, char *filename); -extern void web_client_build_http_header(struct web_client *w); -extern char *strip_control_characters(char *url); +void web_client_build_http_header(struct web_client *w); +char *strip_control_characters(char *url); #include "daemon/common.h" diff --git a/web/server/web_client_cache.h b/web/server/web_client_cache.h index f63888000d..324f23ed98 100644 --- a/web/server/web_client_cache.h +++ b/web/server/web_client_cache.h @@ -21,10 +21,10 @@ struct clients_cache { extern __thread struct clients_cache web_clients_cache; -extern void web_client_release(struct web_client *w); -extern struct web_client *web_client_get_from_cache_or_allocate(); -extern void web_client_cache_destroy(void); -extern void web_client_cache_verify(int force); +void web_client_release(struct web_client *w); +struct web_client *web_client_get_from_cache_or_allocate(); +void web_client_cache_destroy(void); +void web_client_cache_verify(int force); #include "web_server.h" diff --git a/web/server/web_server.h b/web/server/web_server.h index 7bfc81c9df..51230ed2bb 100644 --- a/web/server/web_server.h +++ b/web/server/web_server.h @@ -36,10 +36,10 @@ extern int web_allow_mgmt_dns; extern WEB_SERVER_MODE web_server_mode; -extern WEB_SERVER_MODE web_server_mode_id(const char *mode); -extern const char *web_server_mode_name(WEB_SERVER_MODE id); +WEB_SERVER_MODE web_server_mode_id(const char *mode); +const char *web_server_mode_name(WEB_SERVER_MODE id); -extern void api_listen_sockets_setup(void); +void api_listen_sockets_setup(void); #define DEFAULT_TIMEOUT_TO_RECEIVE_FIRST_WEB_REQUEST 60 #define DEFAULT_DISCONNECT_IDLE_WEB_CLIENTS_AFTER_SECONDS 60 @@ -49,10 +49,10 @@ extern long web_client_streaming_rate_t; #ifdef WEB_SERVER_INTERNALS extern LISTEN_SOCKETS api_sockets; -extern void web_client_update_acl_matches(struct web_client *w); -extern void web_server_log_connection(struct web_client *w, const char *msg); -extern void web_client_initialize_connection(struct web_client *w); -extern struct web_client *web_client_create_on_listenfd(int listener); +void web_client_update_acl_matches(struct web_client *w); +void web_server_log_connection(struct web_client *w, const char *msg); +void web_client_initialize_connection(struct web_client *w); +struct web_client *web_client_create_on_listenfd(int listener); #include "web_client_cache.h" #endif // WEB_SERVER_INTERNALS |