diff options
author | vkalintiris <vasilis@netdata.cloud> | 2021-03-10 10:37:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-10 10:37:47 +0200 |
commit | adec24dffa763654bfa8cfa9ae3bd53296c2c24f (patch) | |
tree | 63f5307373399ed797e2721fadfa2f83971a61b9 /registry/registry_url.c | |
parent | 86ca37683eac5ffd4172c5e62652409087791999 (diff) |
Rename struct avl to avl_element and the typedef to avl_t (#10735)
Before:
```
struct foobar {
avl avl;
...
}
```
After:
```
struct foobar {
avl_t avl;
...
};
```
Which makes figuring out the type from field name easier.
Diffstat (limited to 'registry/registry_url.c')
-rw-r--r-- | registry/registry_url.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/registry/registry_url.c b/registry/registry_url.c index 9ac3ce10c5..559799d8fe 100644 --- a/registry/registry_url.c +++ b/registry/registry_url.c @@ -13,11 +13,11 @@ int registry_url_compare(void *a, void *b) { } inline REGISTRY_URL *registry_url_index_add(REGISTRY_URL *u) { - return (REGISTRY_URL *)avl_insert(&(registry.registry_urls_root_index), (avl *)(u)); + return (REGISTRY_URL *)avl_insert(&(registry.registry_urls_root_index), (avl_t *)(u)); } inline REGISTRY_URL *registry_url_index_del(REGISTRY_URL *u) { - return (REGISTRY_URL *)avl_remove(&(registry.registry_urls_root_index), (avl *)(u)); + return (REGISTRY_URL *)avl_remove(&(registry.registry_urls_root_index), (avl_t *)(u)); } REGISTRY_URL *registry_url_get(const char *url, size_t urllen) { @@ -33,7 +33,7 @@ REGISTRY_URL *registry_url_get(const char *url, size_t urllen) { strncpyz(n->url, url, n->len); n->hash = simple_hash(n->url); - REGISTRY_URL *u = (REGISTRY_URL *)avl_search(&(registry.registry_urls_root_index), (avl *)n); + REGISTRY_URL *u = (REGISTRY_URL *)avl_search(&(registry.registry_urls_root_index), (avl_t *)n); if(!u) { debug(D_REGISTRY, "Registry: registry_url_get('%s', %zu): allocating %zu bytes", url, urllen, sizeof(REGISTRY_URL) + urllen); u = callocz(1, sizeof(REGISTRY_URL) + urllen); // no need for +1, 1 is already in REGISTRY_URL |