From b0063b52d80f72f3eb3202014d459bec988f0583 Mon Sep 17 00:00:00 2001 From: Navid Date: Sun, 8 Jun 2025 16:49:25 -0600 Subject: [PATCH] Remove more redundant casts Signed-off-by: Navid Fayezi navidfayezi.98@gmail.com Reviewed-by: Jakub Jelen Reviewed-by: Andreas Schneider --- include/libssh/priv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/libssh/priv.h b/include/libssh/priv.h index 85f3a9e9..1e21d92b 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -357,10 +357,10 @@ int ssh_connector_remove_event(ssh_connector connector); #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0) /** Zero a structure */ -#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x)) +#define ZERO_STRUCT(x) memset(&(x), 0, sizeof(x)) /** Zero a structure given a pointer to the structure */ -#define ZERO_STRUCTP(x) do { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } while(0) +#define ZERO_STRUCTP(x) do { if ((x) != NULL) memset((x), 0, sizeof(*(x))); } while(0) /** Get the size of an array */ #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))