From: Egor Date: Wed, 18 Oct 2023 20:19:26 +0000 (+0300) Subject: clean up allocClient X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=445a1b150d6233eba6b5e43255c9871aed31a857;p=patchyircd.git clean up allocClient --- diff --git a/net.c b/net.c index 90d4c3c..6bb682d 100644 --- a/net.c +++ b/net.c @@ -6,11 +6,10 @@ #include #endif -struct client_data *allocClient(){ - struct client_data *NewClient = malloc(sizeof(struct client_data)); - memset(NewClient, 0, sizeof(struct client_data)); - return NewClient; -}; +struct client_data *allocClient() +{ + return calloc(1, sizeof(struct client_data)); +} #ifdef HAS_TLS static void block(struct client_data *cl, int out)