Commit 2f806622 authored by Diego Biurrun's avatar Diego Biurrun

bktr: Use memset(0) instead of zero initialization for struct sigaction

sigaction is not defined in standards as a struct starting with another
struct. Some *BSD variants do however, resulting in a warning from the
zero initialization, which this change eliminates.

This partially reverts a92be9b8.
parent ed48a9d8
...@@ -104,7 +104,7 @@ static av_cold int bktr_init(const char *video_device, int width, int height, ...@@ -104,7 +104,7 @@ static av_cold int bktr_init(const char *video_device, int width, int height,
long ioctl_frequency; long ioctl_frequency;
char *arg; char *arg;
int c; int c;
struct sigaction act = { 0 }, old; struct sigaction act, old;
int ret; int ret;
char errbuf[128]; char errbuf[128];
...@@ -135,6 +135,7 @@ static av_cold int bktr_init(const char *video_device, int width, int height, ...@@ -135,6 +135,7 @@ static av_cold int bktr_init(const char *video_device, int width, int height,
frequency = 0.0; frequency = 0.0;
} }
memset(&act, 0, sizeof(act));
sigemptyset(&act.sa_mask); sigemptyset(&act.sa_mask);
act.sa_handler = catchsignal; act.sa_handler = catchsignal;
sigaction(SIGUSR1, &act, &old); sigaction(SIGUSR1, &act, &old);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment