diff options
author | Kevin Steves <stevesk@pobox.com> | 2001-02-17 17:10:16 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@pobox.com> | 2001-02-17 17:10:16 +0000 |
commit | e74ebd03c23896f3f3d3f00cf5cc44c3f16c4c43 (patch) | |
tree | a99c8b260b92a28416ccb77e928d6306d71a6bd9 | |
parent | 970c009b8e9a8187e06c6627c448483765c3f1c1 (diff) |
KNF
-rw-r--r-- | misc.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -102,10 +102,10 @@ mysignal(int sig, mysig_t act) | |||
102 | #ifdef HAVE_SIGACTION | 102 | #ifdef HAVE_SIGACTION |
103 | struct sigaction sa, osa; | 103 | struct sigaction sa, osa; |
104 | 104 | ||
105 | if (sigaction(sig, 0, &osa) == -1) | 105 | if (sigaction(sig, NULL, &osa) == -1) |
106 | return (mysig_t) -1; | 106 | return (mysig_t) -1; |
107 | if (osa.sa_handler != act) { | 107 | if (osa.sa_handler != act) { |
108 | memset(&sa, 0, sizeof sa); | 108 | memset(&sa, 0, sizeof(sa)); |
109 | sigemptyset(&sa.sa_mask); | 109 | sigemptyset(&sa.sa_mask); |
110 | sa.sa_flags = 0; | 110 | sa.sa_flags = 0; |
111 | #ifdef SA_RESTART | 111 | #ifdef SA_RESTART |
@@ -113,7 +113,7 @@ mysignal(int sig, mysig_t act) | |||
113 | sa.sa_flags |= SA_RESTART; | 113 | sa.sa_flags |= SA_RESTART; |
114 | #endif | 114 | #endif |
115 | sa.sa_handler = act; | 115 | sa.sa_handler = act; |
116 | if (sigaction(sig, &sa, 0) == -1) | 116 | if (sigaction(sig, &sa, NULL) == -1) |
117 | return (mysig_t) -1; | 117 | return (mysig_t) -1; |
118 | } | 118 | } |
119 | return (osa.sa_handler); | 119 | return (osa.sa_handler); |