From: Garrett C. <yan...@gm...> - 2012-12-04 16:07:04
|
On Dec 4, 2012, at 4:12 AM, Jan Stancek <jst...@re...> wrote: > int may not be large enough to hold return value from sigset(): > typedef void (*sighandler_t)(int); > sighandler_t sigset(int sig, sighandler_t disp); > > Signed-off-by: Jan Stancek <jst...@re...> > --- > .../conformance/interfaces/sigset/6-1.c | 5 ++--- > .../conformance/interfaces/sigset/7-1.c | 5 ++--- > 2 files changed, 4 insertions(+), 6 deletions(-) > > diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigset/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigset/6-1.c > index 16d340c..286ee37 100644 > --- a/testcases/open_posix_testsuite/conformance/interfaces/sigset/6-1.c > +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigset/6-1.c > @@ -48,9 +48,8 @@ int main(void) > return PTS_UNRESOLVED; > } > > - rc = sigset(SIGCHLD, SIG_HOLD); > - if (rc < 0) { > - ERR_MSG("sigset()", rc); > + if (sigset(SIGCHLD, SIG_HOLD) == SIG_ERR) { > + perror("Unexpected error while using sigset()"); > return PTS_UNRESOLVED; > } > > diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigset/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigset/7-1.c > index b7230db..18d4bb4 100644 > --- a/testcases/open_posix_testsuite/conformance/interfaces/sigset/7-1.c > +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigset/7-1.c > @@ -56,9 +56,8 @@ int main(void) > return PTS_UNRESOLVED; > } > > - rc = sigset(SIGCHLD, SIG_HOLD); > - if (rc < 0) { > - ERR_MSG("sigset()", rc); > + if (sigset(SIGCHLD, SIG_HOLD) == SIG_ERR) { > + perror("Unexpected error while using sigset()"); > return PTS_UNRESOLVED; > } Reviewed-by: Garrett Cooper <yan...@gm...> |