Browse Source

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 14 years ago
parent
commit
22d8707ef2
  1. 6
      src/server.c

6
src/server.c

@ -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;
}

Loading…
Cancel
Save