mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:43:32 +03:00
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:
parent
df246eeb8f
commit
8680a07589
6 changed files with 158 additions and 161 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue