1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

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 a92be9b856.
This commit is contained in:
Diego Biurrun 2016-10-21 14:17:07 +02:00
parent ed48a9d814
commit 2f806622e1

View File

@ -104,7 +104,7 @@ static av_cold int bktr_init(const char *video_device, int width, int height,
long ioctl_frequency;
char *arg;
int c;
struct sigaction act = { 0 }, old;
struct sigaction act, old;
int ret;
char errbuf[128];
@ -135,6 +135,7 @@ static av_cold int bktr_init(const char *video_device, int width, int height,
frequency = 0.0;
}
memset(&act, 0, sizeof(act));
sigemptyset(&act.sa_mask);
act.sa_handler = catchsignal;
sigaction(SIGUSR1, &act, &old);