summaryrefslogtreecommitdiffstats
path: root/libnetdata/string
diff options
context:
space:
mode:
authorvkalintiris <vasilis@netdata.cloud>2022-10-09 16:38:49 +0300
committerGitHub <noreply@github.com>2022-10-09 16:38:49 +0300
commitccfbdb5c3d253a391cab0561dfc8a524b93d2e7c (patch)
treecf5e43618e40801db736604e5c8d4c4e6c0f9f65 /libnetdata/string
parent284d5450ec938b667db9985aca6d3cd02b96487f (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 'libnetdata/string')
-rw-r--r--libnetdata/string/string.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/libnetdata/string/string.h b/libnetdata/string/string.h
index f527f042ff..cec44ebd99 100644
--- a/libnetdata/string/string.h
+++ b/libnetdata/string/string.h
@@ -8,14 +8,14 @@
// STRING implementation
typedef struct netdata_string STRING;
-extern STRING *string_strdupz(const char *str);
-extern STRING *string_dup(STRING *string);
-extern void string_freez(STRING *string);
-extern size_t string_strlen(STRING *string);
-extern const char *string2str(STRING *string) NEVERNULL;
+STRING *string_strdupz(const char *str);
+STRING *string_dup(STRING *string);
+void string_freez(STRING *string);
+size_t string_strlen(STRING *string);
+const char *string2str(STRING *string) NEVERNULL;
// keep common prefix/suffix and replace everything else with [x]
-extern STRING *string_2way_merge(STRING *a, STRING *b);
+STRING *string_2way_merge(STRING *a, STRING *b);
static inline int string_cmp(STRING *s1, STRING *s2) {
// STRINGs are deduplicated, so the same strings have the same pointer
@@ -23,8 +23,8 @@ static inline int string_cmp(STRING *s1, STRING *s2) {
return (s1 == s2)?0:strcmp(string2str(s1), string2str(s2));
}
-extern void string_statistics(size_t *inserts, size_t *deletes, size_t *searches, size_t *entries, size_t *references, size_t *memory, size_t *duplications, size_t *releases);
+void string_statistics(size_t *inserts, size_t *deletes, size_t *searches, size_t *entries, size_t *references, size_t *memory, size_t *duplications, size_t *releases);
-extern int string_unittest(size_t entries);
+int string_unittest(size_t entries);
#endif