examples: omit forward declarations, apply misc fixes

- reorder functions to not need forward declarations.
- sync `ephiperfifo.c` and `evhiperfifo.c`.
- drop redundant casts for `calloc()` return value.
- ephiperfifo: silence unused variable warning.
- fix indent and apply clang-format more.

Closes #20296
This commit is contained in:
Viktor Szakats 2026-01-13 18:17:42 +01:00
parent df246eeb8f
commit 8680a07589
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
6 changed files with 158 additions and 161 deletions

View file

@ -110,7 +110,7 @@ static struct ip *ip_list_append(struct ip *list, const char *data)
struct ip *ip, *last;
char *cidr;
ip = (struct ip *)calloc(1, sizeof(*ip));
ip = calloc(1, sizeof(*ip));
if(!ip)
return NULL;
@ -296,7 +296,7 @@ int main(void)
CURLcode result;
struct connection_filter *filter;
filter = (struct connection_filter *)calloc(1, sizeof(*filter));
filter = calloc(1, sizeof(*filter));
if(!filter)
return 1;