diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-05-11 13:16:44 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-05-11 14:08:47 +0300 |
| commit | 6006b807b1a84d31611173b837fafcd96ba9d692 (patch) | |
| tree | 08f25453328d8c408f1a8c658e4e6ef91005d4a7 /pceplib | |
| parent | f51eeb864bc821d92bd8e95670dde1258ed0747c (diff) | |
*: Properly use memset() when zeroing
Wrong: memset(&a, 0, sizeof(struct ...));
Good: memset(&a, 0, sizeof(a));
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'pceplib')
| -rw-r--r-- | pceplib/pcep_pcc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pceplib/pcep_pcc.c b/pceplib/pcep_pcc.c index 649704f55b..18ccf250ae 100644 --- a/pceplib/pcep_pcc.c +++ b/pceplib/pcep_pcc.c @@ -215,7 +215,7 @@ void handle_signal_action(int sig_number) int setup_signals() { struct sigaction sa; - memset(&sa, 0, sizeof(struct sigaction)); + memset(&sa, 0, sizeof(sa)); sa.sa_handler = handle_signal_action; if (sigaction(SIGINT, &sa, 0) != 0) { perror("sigaction()"); |
