aboutsummaryrefslogtreecommitdiff
path: root/src/player
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-06-26 19:50:32 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-06-26 20:00:27 +0200
commitf938bb790eea27a4ae9db6fe0f6f0300a1e1ae86 (patch)
tree8504a04d90d7296b4562d59803a1b57c899b54e6 /src/player
parenteee1205446e3b1832b256dfebac66f0a0f42e528 (diff)
downloadrts-f938bb790eea27a4ae9db6fe0f6f0300a1e1ae86.tar.gz
Deprecate memset(3) over C99 compound literals for zero-init
Using memset(3) does not ensure pointers are assigned to NULL for all platforms.
Diffstat (limited to 'src/player')
-rw-r--r--src/player/src/human_player.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/player/src/human_player.c b/src/player/src/human_player.c
index aea587c..1b77105 100644
--- a/src/player/src/human_player.c
+++ b/src/player/src/human_player.c
@@ -711,7 +711,7 @@ int human_player_render(const struct human_player *const h,
int human_player_init(const struct human_player_cfg *const cfg,
struct human_player *const h)
{
- memset(h, 0, sizeof *h);
+ *h = (const struct human_player){0};
if (player_init(&cfg->pl, &h->pl))
return -1;