Skip to content

Commit 82ff3d9

Browse files
committed
Move sa declaration to top and initialize it in zero
Signed-off-by: Joel Pelaez Jorge <joel.pelaez.jorge@gmail.com>
1 parent 7f66e00 commit 82ff3d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bubblewrap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2889,6 +2889,7 @@ main (int argc,
28892889
int intermediate_pids_sockets[2] = {-1, -1};
28902890
const char *exec_path = NULL;
28912891
int i;
2892+
struct sigaction sa = {};
28922893

28932894
/* Handle --version early on before we try to acquire/drop
28942895
* any capabilities so it works in a build environment;
@@ -2900,7 +2901,6 @@ main (int argc,
29002901

29012902
/* Reset SIGCHILD to SIG_DFL allowing signalfd working propertly
29022903
* if the parent process had set SIGCHLD to SIG_IGN. */
2903-
struct sigaction sa;
29042904
sigemptyset (&sa.sa_mask);
29052905
sa.sa_handler = SIG_DFL;
29062906
sigaction (SIGCHLD, &sa, NULL);

0 commit comments

Comments
 (0)