Use struct copy instead of memcpy for volatile siginfo_t in server.c

Fixes "discards qualifiers" warning.


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2292 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.20
Stefan Bühler 2008-08-19 22:23:34 +00:00
parent 19588f6ee6
commit 22d8707ef2
1 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ static void sigaction_handler(int sig, siginfo_t *si, void *context) {
switch (sig) {
case SIGTERM:
srv_shutdown = 1;
memcpy(&last_sigterm_info, si, sizeof(*si));
last_sigterm_info = *si;
break;
case SIGINT:
if (graceful_shutdown) {
@ -88,7 +88,7 @@ static void sigaction_handler(int sig, siginfo_t *si, void *context) {
} else {
graceful_shutdown = 1;
}
memcpy(&last_sigterm_info, si, sizeof(*si));
last_sigterm_info = *si;
break;
case SIGALRM:
@ -104,7 +104,7 @@ static void sigaction_handler(int sig, siginfo_t *si, void *context) {
*/
if (!forwarded_sig_hup) {
handle_sig_hup = 1;
memcpy(&last_sighup_info, si, sizeof(*si));
last_sighup_info = *si;
} else {
forwarded_sig_hup = 0;
}