aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Hrubis <chrubis@suse.cz>2014-09-24 16:34:35 +0200
committerCyril Hrubis <chrubis@suse.cz>2014-09-24 16:34:35 +0200
commit4e2bab8415bfd5ddd552220203ed22c93a4617e5 (patch)
tree8c463b7507cee4f9bc63e336c37c34cd8a7ae83f
parent8b35601743f74e3199cdd9139b9ff95d00d2833b (diff)
Make use of NULL
Replace all (type *)0 with NULL Created with coccinelle patch: @@ type T; @@ -(T*)0 +NULL Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
-rw-r--r--pan/ltp-pan.c2
-rw-r--r--testcases/kernel/containers/netns/common.c2
-rw-r--r--testcases/kernel/fs/fsx-linux/fsx-linux.c4
-rw-r--r--testcases/kernel/fs/openfile/openfile.c2
-rw-r--r--testcases/kernel/io/disktest/signals.c2
-rw-r--r--testcases/kernel/io/stress_cd/stress_cd.c2
-rw-r--r--testcases/kernel/ipc/ipc_stress/signal_test_01.c6
-rw-r--r--testcases/kernel/mem/mmapstress/mmapstress01.c2
-rw-r--r--testcases/kernel/mem/mmapstress/mmapstress09.c2
-rw-r--r--testcases/kernel/mem/mmapstress/mmapstress10.c2
-rw-r--r--testcases/kernel/mem/mtest06/mmap1.c4
-rw-r--r--testcases/kernel/mem/mtest06/mmap3.c2
-rw-r--r--testcases/kernel/mem/mtest06/shmat1.c8
-rw-r--r--testcases/kernel/mem/shmt/shmt03.c4
-rw-r--r--testcases/kernel/mem/shmt/shmt08.c4
-rw-r--r--testcases/kernel/mem/shmt/shmt09.c2
-rw-r--r--testcases/kernel/mem/shmt/shmt10.c4
-rw-r--r--testcases/kernel/pty/pty01.c6
-rw-r--r--testcases/kernel/sched/clisrv/pthserv.c2
-rw-r--r--testcases/kernel/sched/sched_stress/sched_driver.c6
-rw-r--r--testcases/kernel/sched/sched_stress/sched_tc0.c6
-rw-r--r--testcases/kernel/sched/sched_stress/sched_tc2.c6
-rw-r--r--testcases/kernel/sched/sched_stress/sched_tc3.c2
-rw-r--r--testcases/kernel/sched/sched_stress/sched_tc6.c2
-rw-r--r--testcases/kernel/syscalls/connect/connect01.c4
-rw-r--r--testcases/kernel/syscalls/getpeername/getpeername01.c2
-rw-r--r--testcases/kernel/syscalls/getsockname/getsockname01.c4
-rw-r--r--testcases/kernel/syscalls/ipc/shmat/shmat03.c2
-rw-r--r--testcases/kernel/syscalls/mkdir/mkdir09.c2
-rw-r--r--testcases/kernel/syscalls/mremap/mremap04.c2
-rw-r--r--testcases/kernel/syscalls/pipe/pipe11.c6
-rw-r--r--testcases/kernel/syscalls/recv/recv01.c4
-rw-r--r--testcases/kernel/syscalls/recvfrom/recvfrom01.c4
-rw-r--r--testcases/kernel/syscalls/recvmsg/recvmsg01.c4
-rw-r--r--testcases/kernel/syscalls/sendfile/sendfile03.c6
-rw-r--r--testcases/kernel/syscalls/sigaltstack/sigaltstack02.c2
-rw-r--r--testcases/misc/math/float/main.c4
-rw-r--r--testcases/misc/math/float/thread_code.c6
-rw-r--r--testcases/network/nfs/nfslock01/nfs_flock_frk.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-5.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c6
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/6-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-2.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/10-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/12-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/14-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/16-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/4-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/5-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/6-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/7-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-2.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-3.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/9-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-1.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-10.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-11.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-12.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-13.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-14.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-15.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-16.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-17.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-18.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-19.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-2.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-20.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-21.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-22.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-23.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-24.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-25.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-26.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-27.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-28.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-29.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-3.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-30.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-31.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-32.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-33.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-34.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-35.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-36.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-37.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-38.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-39.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-4.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-40.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-41.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-42.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-43.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-44.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-45.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-46.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-47.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-48.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-49.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-5.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-50.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-51.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-52.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-6.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-7.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-8.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-9.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-1.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-10.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-11.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-12.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-13.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-14.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-15.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-16.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-17.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-18.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-19.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-2.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-20.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-21.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-22.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-23.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-24.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-25.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-26.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-3.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-4.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-5.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-6.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-7.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-8.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-9.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c2
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c6
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c4
-rw-r--r--testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c2
-rw-r--r--testcases/open_posix_testsuite/functional/mqueues/send_rev_2.c8
-rw-r--r--testcases/open_posix_testsuite/functional/semaphores/sem_conpro.c2
-rw-r--r--testcases/open_posix_testsuite/functional/semaphores/sem_philosopher.c2
-rw-r--r--testcases/open_posix_testsuite/functional/semaphores/sem_readerwriter.c4
-rw-r--r--testcases/open_posix_testsuite/functional/semaphores/sem_sleepingbarber.c4
-rw-r--r--testcases/open_posix_testsuite/functional/threads/schedule/1-1.c4
-rw-r--r--testcases/open_posix_testsuite/functional/threads/schedule/1-2.c4
-rw-r--r--testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c6
-rw-r--r--testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_2.c4
-rw-r--r--testcases/open_posix_testsuite/stress/semaphores/multi_con_pro.c4
-rw-r--r--testcases/realtime/func/async_handler/async_handler.c4
-rw-r--r--testcases/realtime/func/async_handler/async_handler_jk.c2
-rw-r--r--testcases/realtime/func/async_handler/async_handler_tsc.c4
-rw-r--r--testcases/realtime/func/pi-tests/testpi-7.c4
-rw-r--r--testcases/realtime/func/pi_perf/pi_perf.c4
-rw-r--r--testcases/realtime/func/prio-preempt/prio-preempt.c4
-rw-r--r--testcases/realtime/func/pthread_kill_latency/pthread_kill_latency.c2
-rw-r--r--testcases/realtime/func/sched_latency/sched_latency.c2
-rw-r--r--testcases/realtime/stress/pi-tests/lookup_pi_state.c2
-rw-r--r--utils/benchmark/ebizzy-0.3/ebizzy.c2
164 files changed, 299 insertions, 299 deletions
diff --git a/pan/ltp-pan.c b/pan/ltp-pan.c
index f495ef6d6..4c1e9deb6 100644
--- a/pan/ltp-pan.c
+++ b/pan/ltp-pan.c
@@ -1024,7 +1024,7 @@ run_child(struct coll_entry *colle, struct tag_pgrp *active, int quiet_mode,
* cmd directly.
*/
if (strpbrk(c_cmdline, "\"';|<>$\\")) {
- execlp("sh", "sh", "-c", c_cmdline, (char *)0);
+ execlp("sh", "sh", "-c", c_cmdline, NULL);
errlen = sprintf(errbuf,
"pan(%s): execlp of '%s' (tag %s) failed. errno:%d %s",
panname, c_cmdline, colle->name, errno,
diff --git a/testcases/kernel/containers/netns/common.c b/testcases/kernel/containers/netns/common.c
index c28acddcc..16bb7bd97 100644
--- a/testcases/kernel/containers/netns/common.c
+++ b/testcases/kernel/containers/netns/common.c
@@ -52,7 +52,7 @@ static int child_fn(void *c1);
int crtchild(char *s1, char *s2)
{
- char *cmd[] = { "--", s1, s2, (char *)0 };
+ char *cmd[] = { "--", s1, s2, NULL };
execve("/bin/sh", cmd, __environ);
fprintf(stderr, "Failed to execve(%s, %s): %m\n", s1, s2);
return 1;
diff --git a/testcases/kernel/fs/fsx-linux/fsx-linux.c b/testcases/kernel/fs/fsx-linux/fsx-linux.c
index 3229cf029..ccf55fe05 100644
--- a/testcases/kernel/fs/fsx-linux/fsx-linux.c
+++ b/testcases/kernel/fs/fsx-linux/fsx-linux.c
@@ -1086,7 +1086,7 @@ int getnum(char *s, char **e)
{
int ret = -1;
- *e = (char *)0;
+ *e = NULL;
ret = strtol(s, e, 0);
if (*e)
switch (**e) {
@@ -1126,7 +1126,7 @@ int main(int argc, char **argv)
page_size = getpagesize();
page_mask = page_size - 1;
- setvbuf(stdout, (char *)0, _IOLBF, 0); /* line buffered stdout */
+ setvbuf(stdout, NULL, _IOLBF, 0); /* line buffered stdout */
while ((ch = getopt(argc, argv,
"b:c:dl:m:no:p:qr:s:t:w:D:I:LN:OP:RS:W"))
diff --git a/testcases/kernel/fs/openfile/openfile.c b/testcases/kernel/fs/openfile/openfile.c
index a5bc4fd6c..86570644d 100644
--- a/testcases/kernel/fs/openfile/openfile.c
+++ b/testcases/kernel/fs/openfile/openfile.c
@@ -263,5 +263,5 @@ void *threads(void *thread_id_)
/* Close file handles and exit */
close_files(fd_list, numfiles);
unlink(filename);
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
diff --git a/testcases/kernel/io/disktest/signals.c b/testcases/kernel/io/disktest/signals.c
index c4b63383b..dac1dcb94 100644
--- a/testcases/kernel/io/disktest/signals.c
+++ b/testcases/kernel/io/disktest/signals.c
@@ -118,7 +118,7 @@ void *sig_handler(void *arg)
}
#ifndef WINDOWS
}
- return (void *)0;
+ return NULL;
#endif
}
diff --git a/testcases/kernel/io/stress_cd/stress_cd.c b/testcases/kernel/io/stress_cd/stress_cd.c
index 4265c717c..0209a1fd6 100644
--- a/testcases/kernel/io/stress_cd/stress_cd.c
+++ b/testcases/kernel/io/stress_cd/stress_cd.c
@@ -192,7 +192,7 @@ void *thread(int *parm)
if (debug)
printf("\tThread [%d]: done\n", num);
- pthread_exit((void *)0);
+ pthread_exit(NULL);
return (NULL);
}
diff --git a/testcases/kernel/ipc/ipc_stress/signal_test_01.c b/testcases/kernel/ipc/ipc_stress/signal_test_01.c
index 601a807c2..250bd8a19 100644
--- a/testcases/kernel/ipc/ipc_stress/signal_test_01.c
+++ b/testcases/kernel/ipc/ipc_stress/signal_test_01.c
@@ -141,7 +141,7 @@ int main(int argc, char **argv)
if (sigaltstack(&stack, NULL) < 0)
sys_error("sigaltstack failed", __LINE__);
#else
- if (sigstack(&stack, (struct sigstack *)0) < 0)
+ if (sigstack(&stack, NULL) < 0)
sys_error("sigstack failed", __LINE__);
#endif
/*
@@ -307,7 +307,7 @@ void init_sig_vec()
//sigaction.sa_mask = 0;
invec.sa_flags = 0;
- if (sigaction(i, &invec, (struct sigaction *)0)) {
+ if (sigaction(i, &invec, NULL)) {
sprintf(errmsg,
"init_sig_vec: sigaction failed on signal (%d)",
i);
@@ -337,7 +337,7 @@ void init_sig_vec()
#else
invec.sv_onstack = 1;
#endif
- if (sigvec(i, &invec, (struct sigvec *)0)) {
+ if (sigvec(i, &invec, NULL)) {
sprintf(errmsg,
"init_sig_vec: sigvec failed on signal (%d)",
i);
diff --git a/testcases/kernel/mem/mmapstress/mmapstress01.c b/testcases/kernel/mem/mmapstress/mmapstress01.c
index 9489b215c..7daf27221 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress01.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress01.c
@@ -719,7 +719,7 @@ unsigned int initrand(void)
*/
srand((unsigned int)getpid());
seed = rand();
- srand((unsigned int)time((time_t *) 0));
+ srand((unsigned int)time(NULL));
seed = (seed ^ rand()) % 100000;
srand48((long int)seed);
return (seed);
diff --git a/testcases/kernel/mem/mmapstress/mmapstress09.c b/testcases/kernel/mem/mmapstress/mmapstress09.c
index 0c029e2de..1865d119b 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress09.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress09.c
@@ -480,7 +480,7 @@ unsigned int initrand(void)
*/
srand((unsigned int)getpid());
seed = rand();
- srand((unsigned int)time((time_t *) 0));
+ srand((unsigned int)time(NULL));
seed = (seed ^ rand()) % 100000;
srand48((long int)seed);
return (seed);
diff --git a/testcases/kernel/mem/mmapstress/mmapstress10.c b/testcases/kernel/mem/mmapstress/mmapstress10.c
index 9196b1955..534e6665e 100644
--- a/testcases/kernel/mem/mmapstress/mmapstress10.c
+++ b/testcases/kernel/mem/mmapstress/mmapstress10.c
@@ -922,7 +922,7 @@ unsigned int initrand(void)
*/
srand((unsigned int)getpid());
seed = rand();
- srand((unsigned int)time((time_t *) 0));
+ srand((unsigned int)time(NULL));
seed = (seed ^ rand()) % 100000;
srand48((long int)seed);
return (seed);
diff --git a/testcases/kernel/mem/mtest06/mmap1.c b/testcases/kernel/mem/mtest06/mmap1.c
index cd1127fb8..9abe03639 100644
--- a/testcases/kernel/mem/mtest06/mmap1.c
+++ b/testcases/kernel/mem/mtest06/mmap1.c
@@ -199,7 +199,7 @@ void *map_write_unmap(void *ptr)
}
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
void *read_mem(void *ptr)
@@ -246,7 +246,7 @@ void *read_mem(void *ptr)
}
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
static void usage(char *progname)
diff --git a/testcases/kernel/mem/mtest06/mmap3.c b/testcases/kernel/mem/mtest06/mmap3.c
index 143c6d683..a304d9f9b 100644
--- a/testcases/kernel/mem/mtest06/mmap3.c
+++ b/testcases/kernel/mem/mtest06/mmap3.c
@@ -239,7 +239,7 @@ void *map_write_unmap(void *args)
}
close(fd);
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
/******************************************************************************/
diff --git a/testcases/kernel/mem/mtest06/shmat1.c b/testcases/kernel/mem/mtest06/shmat1.c
index fc950da78..0d6d7a47a 100644
--- a/testcases/kernel/mem/mtest06/shmat1.c
+++ b/testcases/kernel/mem/mtest06/shmat1.c
@@ -245,7 +245,7 @@ void *shmat_shmdt(void *args)
STR_SHMAT, pthread_self(), fsize);
}
- if ((map_address = shmat(shmid, (void *)0, 0))
+ if ((map_address = shmat(shmid, NULL, 0))
== (void *)-1) {
fprintf(stderr, "shmat_shmat(): map address = %p\n",
map_address);
@@ -281,7 +281,7 @@ void *shmat_shmdt(void *args)
pthread_exit((void *)-1);
}
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
/******************************************************************************/
@@ -321,7 +321,7 @@ void *write_to_mem(void *args)
usleep(1);
sched_yield();
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
/******************************************************************************/
@@ -368,7 +368,7 @@ void *read_from_mem(void *args)
usleep(1);
sched_yield();
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
/******************************************************************************/
diff --git a/testcases/kernel/mem/shmt/shmt03.c b/testcases/kernel/mem/shmt/shmt03.c
index 46406b6f3..5a857e1db 100644
--- a/testcases/kernel/mem/shmt/shmt03.c
+++ b/testcases/kernel/mem/shmt/shmt03.c
@@ -77,7 +77,7 @@ int main()
/*------------------------------------------------------------*/
- if ((cp1 = (char *)shmat(shmid, (void *)0, 0)) == (char *)-1) {
+ if ((cp1 = (char *)shmat(shmid, NULL, 0)) == (char *)-1) {
perror("shmat");
tst_resm(TFAIL, "shmat Failed: shmid = %d, errno = %d\n",
shmid, errno);
@@ -91,7 +91,7 @@ int main()
/*------------------------------------------------------------*/
- if ((cp2 = (char *)shmat(shmid, (void *)0, 0)) == (char *)-1) {
+ if ((cp2 = (char *)shmat(shmid, NULL, 0)) == (char *)-1) {
perror("shmat");
tst_resm(TFAIL, "shmat Failed: shmid = %d, errno = %d\n",
shmid, errno);
diff --git a/testcases/kernel/mem/shmt/shmt08.c b/testcases/kernel/mem/shmt/shmt08.c
index c65fa6cb2..b1e7a740c 100644
--- a/testcases/kernel/mem/shmt/shmt08.c
+++ b/testcases/kernel/mem/shmt/shmt08.c
@@ -70,14 +70,14 @@ int main()
tst_exit();
}
- cp = (char *)shmat(shmid, (void *)0, 0);
+ cp = (char *)shmat(shmid, NULL, 0);
if (cp == (char *)-1) {
tst_resm(TFAIL, "shmat1 Failed");
rm_shm(shmid);
tst_exit();
}
- cp1 = (char *)shmat(shmid, (void *)0, 0);
+ cp1 = (char *)shmat(shmid, NULL, 0);
if (cp1 == (char *)-1) {
perror("shmat2");
rm_shm(shmid);
diff --git a/testcases/kernel/mem/shmt/shmt09.c b/testcases/kernel/mem/shmt/shmt09.c
index 0cb22b483..c6b7a9dce 100644
--- a/testcases/kernel/mem/shmt/shmt09.c
+++ b/testcases/kernel/mem/shmt/shmt09.c
@@ -100,7 +100,7 @@ int main()
tst_exit();
}
- c1 = (char *)shmat(shmid, (void *)0, 0);
+ c1 = (char *)shmat(shmid, NULL, 0);
if (c1 == (char *)-1) {
perror("shmat");
tst_resm(TFAIL,
diff --git a/testcases/kernel/mem/shmt/shmt10.c b/testcases/kernel/mem/shmt/shmt10.c
index 4e0036f6c..6add8369f 100644
--- a/testcases/kernel/mem/shmt/shmt10.c
+++ b/testcases/kernel/mem/shmt/shmt10.c
@@ -114,7 +114,7 @@ char *argv[];
}
for (i = 0; i < iter; i++) {
- if ((c1 = (char *)shmat(shmid, (void *)0, 0)) == (char *)-1) {
+ if ((c1 = (char *)shmat(shmid, NULL, 0)) == (char *)-1) {
tst_resm(TFAIL,
"Error shmat: iter %d, shmid = %d\n", i,
shmid);
@@ -153,7 +153,7 @@ int iter;
char *c1;
for (i = 0; i < iter; i++) {
- if ((c1 = (char *)shmat(shmid, (void *)0, 0)) == (char *)-1) {
+ if ((c1 = (char *)shmat(shmid, NULL, 0)) == (char *)-1) {
tst_resm(TFAIL,
"Error:child proc: shmat: iter %d, shmid = %d\n",
i, shmid);
diff --git a/testcases/kernel/pty/pty01.c b/testcases/kernel/pty/pty01.c
index 8d204985f..c6e89459a 100644
--- a/testcases/kernel/pty/pty01.c
+++ b/testcases/kernel/pty/pty01.c
@@ -206,7 +206,7 @@ static void test2(void)
}
slavename = ptsname(masterfd);
- if (slavename == (char *)0) {
+ if (slavename == NULL) {
tst_brkm(TBROK | TERRNO, NULL, "ptsname() call failed");
}
@@ -267,7 +267,7 @@ static void test3(void)
tst_brkm(TBROK, NULL, MASTERCLONE);
}
- if (ioctl(masterfd, TIOCGWINSZ, (char *)0) == 0) {
+ if (ioctl(masterfd, TIOCGWINSZ, NULL) == 0) {
tst_brkm(TFAIL | TERRNO, NULL,
"trying TIOCGWINSZ on master with no open slave "
"succeeded unexpectedly");
@@ -293,7 +293,7 @@ static void test4(void)
}
slavename = ptsname(masterfd);
- if (slavename == (char *)0) {
+ if (slavename == NULL) {
tst_resm(TBROK, "ptsname() call failed");
tst_exit();
}
diff --git a/testcases/kernel/sched/clisrv/pthserv.c b/testcases/kernel/sched/clisrv/pthserv.c
index 64e343147..7aeb63f6e 100644
--- a/testcases/kernel/sched/clisrv/pthserv.c
+++ b/testcases/kernel/sched/clisrv/pthserv.c
@@ -179,5 +179,5 @@ void *new_thread(void *arg_)
#else
sched_yield();
#endif
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
diff --git a/testcases/kernel/sched/sched_stress/sched_driver.c b/testcases/kernel/sched/sched_stress/sched_driver.c
index 9d9f85d1b..3de7d5f68 100644
--- a/testcases/kernel/sched/sched_stress/sched_driver.c
+++ b/testcases/kernel/sched/sched_stress/sched_driver.c
@@ -176,7 +176,7 @@ int main(int argc, char **argv)
* Calculate number of seconds to run, then print out start info
*/
runseconds = (long)(execution_time * 60.0 * 60.0);
- start_time = time((long *)0);
+ start_time = time(NULL);
startup(start_time);
@@ -446,7 +446,7 @@ float *t2; /* if sched_tc6: second time returned from testcase */
*/
if (debug)
printf("waiting on child %d\n", saved_pid);
- while (wait((void *)0) != saved_pid) ;
+ while (wait(NULL) != saved_pid) ;
/*
* Open the temporary file to get the returned number of seconds
@@ -739,7 +739,7 @@ long start_time; /* starting time to calculate elapsed time */
/*
* Get the end time and calculate elapsed time; write all this out
*/
- end_time = time((long *)0);
+ end_time = time(NULL);
printf("\nend time = %s\n", ctime(&end_time));
diff --git a/testcases/kernel/sched/sched_stress/sched_tc0.c b/testcases/kernel/sched/sched_stress/sched_tc0.c
index 735c2298e..9acbc2f58 100644
--- a/testcases/kernel/sched/sched_stress/sched_tc0.c
+++ b/testcases/kernel/sched/sched_stress/sched_tc0.c
@@ -138,15 +138,15 @@ int main(int argc, char **argv)
* Continuously read through file as time permits...
*/
i = 0;
- start_time = time((long *)0);
+ start_time = time(NULL);
if (debug)
printf("\n");
- while ((time((long *)0) - start_time) < execution_time) {
+ while ((time(NULL) - start_time) < execution_time) {
if (debug) {
printf("\r\tprocessing file [%d], time left: %ld",
i++,
- execution_time - (time((long *)0) - start_time));
+ execution_time - (time(NULL) - start_time));
fflush(stdout);
}
process_file(filename);
diff --git a/testcases/kernel/sched/sched_stress/sched_tc2.c b/testcases/kernel/sched/sched_stress/sched_tc2.c
index 7aade76f9..1e2e3e629 100644
--- a/testcases/kernel/sched/sched_stress/sched_tc2.c
+++ b/testcases/kernel/sched/sched_stress/sched_tc2.c
@@ -140,15 +140,15 @@ int main(int argc, char **argv)
* Continuously multiply matrix as time permits...
*/
i = 0;
- start_time = time((long *)0);
+ start_time = time(NULL);
if (debug)
printf("\n");
- while ((time((long *)0) - start_time) < execution_time) {
+ while ((time(NULL) - start_time) < execution_time) {
if (debug) {
printf("\r\tmultiplying matrix [%d], time left: %ld",
i++,
- execution_time - (time((long *)0) - start_time));
+ execution_time - (time(NULL) - start_time));
fflush(stdout);
}
multiply_matrices();
diff --git a/testcases/kernel/sched/sched_stress/sched_tc3.c b/testcases/kernel/sched/sched_stress/sched_tc3.c
index 7d2372cf5..8064e9eda 100644
--- a/testcases/kernel/sched/sched_stress/sched_tc3.c
+++ b/testcases/kernel/sched/sched_stress/sched_tc3.c
@@ -142,7 +142,7 @@ int main(int argc, char **argv)
* Continuously multiply matrix as time permits...
*/
i = 0;
- start_time = time((long *)0);
+ start_time = time(NULL);
/*
* Continuously read through file until interrupted...
diff --git a/testcases/kernel/sched/sched_stress/sched_tc6.c b/testcases/kernel/sched/sched_stress/sched_tc6.c
index 43d3c094d..e70e8f250 100644
--- a/testcases/kernel/sched/sched_stress/sched_tc6.c
+++ b/testcases/kernel/sched/sched_stress/sched_tc6.c
@@ -229,7 +229,7 @@ int main(int argc, char **argv)
("parent waiting on child process %d to complete\n",
pid);
- while ((rc = wait((void *)0)) != pid)
+ while ((rc = wait(NULL)) != pid)
if (rc == -1)
sys_error("wait failed", __FILE__, __LINE__);
/*
diff --git a/testcases/kernel/syscalls/connect/connect01.c b/testcases/kernel/syscalls/connect/connect01.c
index b66f9edc6..fb929df30 100644
--- a/testcases/kernel/syscalls/connect/connect01.c
+++ b/testcases/kernel/syscalls/connect/connect01.c
@@ -298,8 +298,8 @@ void do_child(void)
memcpy(&rfds, &afds, sizeof(rfds));
- if (select(nfds, &rfds, (fd_set *) 0, (fd_set *) 0,
- (struct timeval *)0) < 0)
+ if (select(nfds, &rfds, NULL, NULL,
+ NULL) < 0)
if (errno != EINTR)
exit(1);
if (FD_ISSET(sfd, &rfds)) {
diff --git a/testcases/kernel/syscalls/getpeername/getpeername01.c b/testcases/kernel/syscalls/getpeername/getpeername01.c
index bfe61aeb3..305cc673a 100644
--- a/testcases/kernel/syscalls/getpeername/getpeername01.c
+++ b/testcases/kernel/syscalls/getpeername/getpeername01.c
@@ -71,7 +71,7 @@ struct test_case_t {
#ifndef UCLINUX
{-1, (struct sockaddr *)-1, &sinlen, -1, EFAULT, setup4, cleanup4,
"EFAULT"},
- {-1, (struct sockaddr *)&fsin1, (socklen_t *)0, -1, EFAULT, setup4,
+ {-1, (struct sockaddr *)&fsin1, NULL, -1, EFAULT, setup4,
cleanup4, "EFAULT"},
{-1, (struct sockaddr *)&fsin1, (socklen_t *)1, -1, EFAULT, setup4,
cleanup4, "EFAULT"},
diff --git a/testcases/kernel/syscalls/getsockname/getsockname01.c b/testcases/kernel/syscalls/getsockname/getsockname01.c
index be7da9b9f..59ebc4818 100644
--- a/testcases/kernel/syscalls/getsockname/getsockname01.c
+++ b/testcases/kernel/syscalls/getsockname/getsockname01.c
@@ -86,12 +86,12 @@ struct test_case_t { /* test case structure */
#ifndef UCLINUX
/* Skip since uClinux does not implement memory protection */
{
- PF_INET, SOCK_STREAM, 0, (struct sockaddr *)0,
+ PF_INET, SOCK_STREAM, 0, NULL,
&sinlen, -1, EFAULT, setup1, cleanup1,
"invalid socket buffer"}, {
/* invalid salen test for aligned input */
PF_INET, SOCK_STREAM, 0, (struct sockaddr *)&fsin1,
- (socklen_t *) 0, -1, EFAULT, setup1, cleanup1,
+ NULL, -1, EFAULT, setup1, cleanup1,
"invalid aligned salen"}, {
/* invalid salen test for unaligned input */
PF_INET, SOCK_STREAM, 0, (struct sockaddr *)&fsin1,
diff --git a/testcases/kernel/syscalls/ipc/shmat/shmat03.c b/testcases/kernel/syscalls/ipc/shmat/shmat03.c
index d5d3638fa..5dc9f26d6 100644
--- a/testcases/kernel/syscalls/ipc/shmat/shmat03.c
+++ b/testcases/kernel/syscalls/ipc/shmat/shmat03.c
@@ -128,7 +128,7 @@ static void do_child(void)
* use TEST macro to make the call
*/
errno = 0;
- addr = shmat(shm_id_1, (const void *)0, 0);
+ addr = shmat(shm_id_1, NULL, 0);
TEST_ERRNO = errno;
if (addr != (char *)-1) {
diff --git a/testcases/kernel/syscalls/mkdir/mkdir09.c b/testcases/kernel/syscalls/mkdir/mkdir09.c
index 2e989ee27..55f18498c 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir09.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir09.c
@@ -211,7 +211,7 @@ int runtest(void)
/* allocate space for list of child pid's */
if ((pidlist = malloc((child_groups * NCHILD) * sizeof(int))) ==
- (int *)0) {
+ NULL) {
tst_resm(TWARN, "\tMalloc failed (may be OK if under stress)");
tst_exit();
}
diff --git a/testcases/kernel/syscalls/mremap/mremap04.c b/testcases/kernel/syscalls/mremap/mremap04.c
index ef16a3126..0a56c1bc3 100644
--- a/testcases/kernel/syscalls/mremap/mremap04.c
+++ b/testcases/kernel/syscalls/mremap/mremap04.c
@@ -213,7 +213,7 @@ void setup(void)
* the calling process at the first available address as selected
* by the system.
*/
- shmaddr = (char *)shmat(shmid, (char *)0, 0);
+ shmaddr = (char *)shmat(shmid, NULL, 0);
if (shmaddr == (void *)-1) {
tst_brkm(TBROK, cleanup, "shmat() Failed to attach shared "
"memory, error:%d", errno);
diff --git a/testcases/kernel/syscalls/pipe/pipe11.c b/testcases/kernel/syscalls/pipe/pipe11.c
index c135b6dbc..eef701d1d 100644
--- a/testcases/kernel/syscalls/pipe/pipe11.c
+++ b/testcases/kernel/syscalls/pipe/pipe11.c
@@ -190,7 +190,7 @@ void do_child(void)
*/
void do_child_uclinux(void)
{
- if ((rdbuf = malloc(szcharbuf)) == (char *)0) {
+ if ((rdbuf = malloc(szcharbuf)) == NULL) {
tst_brkm(TBROK, cleanup, "malloc of rdbuf failed");
}
@@ -222,11 +222,11 @@ void setup(void)
ncperchild = szcharbuf / numchild;
}
- if ((wrbuf = malloc(szcharbuf)) == (char *)0) {
+ if ((wrbuf = malloc(szcharbuf)) == NULL) {
tst_brkm(TBROK, cleanup, "malloc failed");
}
- if ((rdbuf = malloc(szcharbuf)) == (char *)0) {
+ if ((rdbuf = malloc(szcharbuf)) == NULL) {
tst_brkm(TBROK, cleanup, "malloc of rdbuf failed");
}
diff --git a/testcases/kernel/syscalls/recv/recv01.c b/testcases/kernel/syscalls/recv/recv01.c
index f261104bf..f07f33941 100644
--- a/testcases/kernel/syscalls/recv/recv01.c
+++ b/testcases/kernel/syscalls/recv/recv01.c
@@ -278,8 +278,8 @@ void do_child(void)
memcpy(&rfds, &afds, sizeof(rfds));
- if (select(nfds, &rfds, (fd_set *) 0, (fd_set *) 0,
- (struct timeval *)0) < 0)
+ if (select(nfds, &rfds, NULL, NULL,
+ NULL) < 0)
if (errno != EINTR)
exit(1);
if (FD_ISSET(sfd, &rfds)) {
diff --git a/testcases/kernel/syscalls/recvfrom/recvfrom01.c b/testcases/kernel/syscalls/recvfrom/recvfrom01.c
index a0e06a881..90c5f21bc 100644
--- a/testcases/kernel/syscalls/recvfrom/recvfrom01.c
+++ b/testcases/kernel/syscalls/recvfrom/recvfrom01.c
@@ -305,8 +305,8 @@ void do_child(void)
memcpy(&rfds, &afds, sizeof(rfds));
- if (select(nfds, &rfds, (fd_set *) 0, (fd_set *) 0,
- (struct timeval *)0) < 0)
+ if (select(nfds, &rfds, NULL, NULL,
+ NULL) < 0)
if (errno != EINTR)
exit(1);
if (FD_ISSET(sfd, &rfds)) {
diff --git a/testcases/kernel/syscalls/recvmsg/recvmsg01.c b/testcases/kernel/syscalls/recvmsg/recvmsg01.c
index 208e82c00..35fe4cae0 100644
--- a/testcases/kernel/syscalls/recvmsg/recvmsg01.c
+++ b/testcases/kernel/syscalls/recvmsg/recvmsg01.c
@@ -441,8 +441,8 @@ void do_child(void)
memcpy(&rfds, &afds, sizeof(rfds));
- if (select(nfds, &rfds, (fd_set *) 0, (fd_set *) 0,
- (struct timeval *)0) < 0) {
+ if (select(nfds, &rfds, NULL, NULL,
+ NULL) < 0) {
if (errno != EINTR) {
perror("server select");
exit(1);
diff --git a/testcases/kernel/syscalls/sendfile/sendfile03.c b/testcases/kernel/syscalls/sendfile/sendfile03.c
index 31662eba4..e57371f0e 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile03.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile03.c
@@ -79,9 +79,9 @@ struct test_case_t {
int exp_errno;
} testcases[] = {
{
- "Test for EBADF, in_fd = -1", NULL, 8, -1, (void *)0, 0, EBADF}, {
- "Test for EBADF, out_fd = -1", NULL, -1, 7, (void *)0, 0, EBADF}, {
- "Test for EBADF, in_fd = out_fd = -1", NULL, -1, -1, (void *)0,
+ "Test for EBADF, in_fd = -1", NULL, 8, -1, NULL, 0, EBADF}, {
+ "Test for EBADF, out_fd = -1", NULL, -1, 7, NULL, 0, EBADF}, {
+ "Test for EBADF, in_fd = out_fd = -1", NULL, -1, -1, NULL,
0, EBADF}
};
diff --git a/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c b/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
index 0a37c8a55..7e6f75e61 100644
--- a/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
+++ b/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
@@ -136,7 +136,7 @@ int main(int ac, char **av)
test_desc = Test_cases[ind].desc;
/* Verify sigaltstack() fails and sets errno */
- TEST(sigaltstack(&sigstk, (stack_t *) 0));
+ TEST(sigaltstack(&sigstk, NULL));
/* Check return code from sigaltstack() */
if (TEST_RETURN == -1) {
diff --git a/testcases/misc/math/float/main.c b/testcases/misc/math/float/main.c
index e947d0ffd..d71ca18e6 100644
--- a/testcases/misc/math/float/main.c
+++ b/testcases/misc/math/float/main.c
@@ -133,8 +133,8 @@ int main(int argc, char *argv[])
tst_tmpdir();
- setbuf(stdout, (char *)0);
- setbuf(stderr, (char *)0);
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
datadir[0] = '.';
datadir[1] = '\0';
diff --git a/testcases/misc/math/float/thread_code.c b/testcases/misc/math/float/thread_code.c
index 4eb6ff668..ca18cef1e 100644
--- a/testcases/misc/math/float/thread_code.c
+++ b/testcases/misc/math/float/thread_code.c
@@ -69,7 +69,7 @@ static size_t read_file(char *fname, void **data)
return (size_t) 0;
}
- while ((buffer = malloc(fsize)) == (void *)0) {
+ while ((buffer = malloc(fsize)) == NULL) {
if (errno == EINTR || errno == 0) {
printf("Error malloc'ing: %s\n", strerror(errno));
pthread_testcancel();
@@ -278,7 +278,7 @@ void *thread_code(void *arg)
{
TH_DATA *th_data = (TH_DATA *) arg;
size_t fsize, fsize2, fsize3;
- double *din, *dex, *dex2 = (double *)0;
+ double *din, *dex, *dex2 = NULL;
int imax, index;
fsize = read_file(th_data->th_func.din_fname, (void **)&din);
@@ -408,5 +408,5 @@ file_size_error:
SAFE_FREE(dex);
if (fsize3)
SAFE_FREE(dex2);
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
diff --git a/testcases/network/nfs/nfslock01/nfs_flock_frk.c b/testcases/network/nfs/nfslock01/nfs_flock_frk.c
index ba513aaea..234da9f13 100644
--- a/testcases/network/nfs/nfslock01/nfs_flock_frk.c
+++ b/testcases/network/nfs/nfslock01/nfs_flock_frk.c
@@ -27,9 +27,9 @@ int main(int argc, char **argv)
printf("Failed in forking, Errno = %d", errno);
exit(2);
} else if (pid == 0) { /* child */
- execl(argv[1], Prog, "0", argv[2], (char *)0);
+ execl(argv[1], Prog, "0", argv[2], NULL);
} else { /* parent */
- execl(argv[1], Prog, "1", argv[2], (char *)0);
+ execl(argv[1], Prog, "1", argv[2], NULL);
}
/*if (waitpid(pid, NULL, 0) != pid)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-5.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-5.c
index 4dbb17a71..257689ba1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-5.c
@@ -100,7 +100,7 @@ void *threaded(void *arg)
/* wait for the cond - bind the cond to the mutex m1 */
do {
- if (arg == (void *)0)
+ if (arg == NULL)
ret = pthread_cond_wait(&(data.cnd), &(data.mtx1));
else
ret = pthread_cond_timedwait(&(data.cnd), &(data.mtx1),
@@ -135,7 +135,7 @@ void *threaded(void *arg)
/* wait for the cond - bind the cond to the mutex m2 */
do {
- if (arg == (void *)0)
+ if (arg == NULL)
ret = pthread_cond_wait(&(data.cnd), &(data.mtx2));
else
ret = pthread_cond_timedwait(&(data.cnd), &(data.mtx2),
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c
index 0a6b26130..f7f9c752e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/1-5.c
@@ -136,7 +136,7 @@ void *overflow(void *arg)
output
("Growing up stack started below %p and we are currently up to %p\n",
arg, &current);
- return (void *)0;
+ return NULL;
}
} else {
/* the stack is growing down */
@@ -144,7 +144,7 @@ void *overflow(void *arg)
output
("Growing down stack started upon %p and we are currently down to %p\n",
arg, &current);
- return (void *)0;
+ return NULL;
}
}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c
index 469d1ba2d..8423511d1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/3-2.c
@@ -156,7 +156,7 @@ void *overflow(void *arg)
output
("Growing up stack started below %p and we are currently up to %p\n",
arg, &current);
- return (void *)0;
+ return NULL;
}
} else {
/* the stack is growing down */
@@ -164,7 +164,7 @@ void *overflow(void *arg)
output
("Growing down stack started upon %p and we are currently down to %p\n",
arg, &current);
- return (void *)0;
+ return NULL;
}
}
@@ -300,7 +300,7 @@ int test_stack(pthread_attr_t * ta, size_t newsize)
if (ret != 0) {
UNRESOLVED(ret, "Unable to join a thread");
}
- if (rc != (void *)0) {
+ if (rc != NULL) {
UNRESOLVED((int)(long)rc,
"The overflow function returned an unexpected value");
}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/6-1.c
index bed43b210..a4b2d0d89 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_kill/6-1.c
@@ -24,7 +24,7 @@
void *thread_function(void *arg)
{
/* Does nothing */
- pthread_exit((void *)0);
+ pthread_exit(NULL);
/* To please some compilers */
return NULL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-2.c
index a9f30465f..618054e2e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_settype/3-2.c
@@ -41,7 +41,7 @@ void *a_thread_func()
{
/* Try to unlock the mutex that main already locked. */
ret = pthread_mutex_unlock(&mutex);
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int main(void)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/10-1.c
index 934450fcc..bcd3057c2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/10-1.c
@@ -44,7 +44,7 @@ void *a_thread_func()
}
printf("Test PASSED\n");
- pthread_exit((void *)0);
+ pthread_exit(NULL);
/* To please some compilers */
return NULL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/12-1.c
index d1bc49c3b..fab202a24 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/12-1.c
@@ -107,7 +107,7 @@ void *a_thread_func()
*/
printf("PASS: signal mask was not changed.\n");
- pthread_exit((void *)0);
+ pthread_exit(NULL);
/* To please some compilers */
return NULL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/14-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/14-1.c
index 44de2284b..d8c852183 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/14-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/14-1.c
@@ -35,7 +35,7 @@ void *a_thread_func()
}
printf("PASS: pthread_sigmask returned 0.\n");
- pthread_exit((void *)0);
+ pthread_exit(NULL);
/* To please some compilers */
return NULL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/16-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/16-1.c
index 8cfb35be9..2c67cfc87 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/16-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/16-1.c
@@ -52,7 +52,7 @@ void *a_thread_func()
}
printf("PASS: pthread_sigmask returned the correct error value.\n");
- pthread_exit((void *)0);
+ pthread_exit(NULL);
/* To please some compilers */
return NULL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/4-1.c
index c27cf779f..f83242fa2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/4-1.c
@@ -98,7 +98,7 @@ void *a_thread_func()
pthread_exit((void *)-1);
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
return NULL;
}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/5-1.c
index 23729e72e..5efc28c3d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/5-1.c
@@ -107,7 +107,7 @@ void *a_thread_func()
pthread_exit((void *)-1);
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
return NULL;
}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/6-1.c
index a87d069c6..0dd0cd87d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/6-1.c
@@ -119,7 +119,7 @@ void *a_thread_func()
pthread_exit((void *)-1);
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
return NULL;
}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/7-1.c
index adb819448..77836a18b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/7-1.c
@@ -69,7 +69,7 @@ void *a_thread_func()
printf
("Test PASSED: oactl did contain all signals that were added to the signal mask.\n");
- pthread_exit((void *)0);
+ pthread_exit(NULL);
/* To please some compilers */
return NULL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-1.c
index 01acf04ef..cab162af2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-1.c
@@ -70,7 +70,7 @@ void *a_thread_func()
pthread_exit((void *)-1);
}
printf("PASS: signal mask was not changed.\n");
- pthread_exit((void *)0);
+ pthread_exit(NULL);
/* To please some compilers */
return NULL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-2.c
index 8e555d0e9..6ef81bb33 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-2.c
@@ -71,7 +71,7 @@ void *a_thread_func()
pthread_exit((void *)-1);
}
printf("PASS: signal mask was not changed.\n");
- pthread_exit((void *)0);
+ pthread_exit(NULL);
/* To please some compilers */
return NULL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-3.c
index bff16d01f..3175c1fc1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-3.c
@@ -70,7 +70,7 @@ void *a_thread_func()
pthread_exit((void *)-1);
}
printf("PASS: signal mask was not changed.\n");
- pthread_exit((void *)0);
+ pthread_exit(NULL);
/* To please some compilers */
return NULL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/9-1.c
index 7cdd3c168..3b3e818ae 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/9-1.c
@@ -83,7 +83,7 @@ void *a_thread_func()
printf
("Test PASSED: signal was delivered before the call to pthread_sigmask returned.\n");
- pthread_exit((void *)0);
+ pthread_exit(NULL);
/* To please some compilers */
return NULL;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-1.c
index a50148af4..c9db8234c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-1.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGABRT\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-10.c
index 1cc063d19..8249eec81 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-10.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGPIPE\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-11.c
index 3acde2165..c81a1c5e7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-11.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGQUIT\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-12.c
index a60d90c51..61a52e155 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-12.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGSEGV\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-13.c
index c29326c36..f94db80e3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-13.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGTERM\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-14.c
index f45823295..b0d1fde6c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-14.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGTSTP\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-15.c
index b47d6d9f6..909e31958 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-15.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGTTIN\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-16.c
index f1d89ec8a..c69ceb606 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-16.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGTTOU\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-17.c
index c920e9546..c4b3b146f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-17.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGUSR1\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-18.c
index 0fdd0a251..f614672ca 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-18.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGUSR2\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-19.c
index 0fdd0a251..f614672ca 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-19.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGUSR2\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-2.c
index 0fdd0a251..f614672ca 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-2.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGUSR2\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-20.c
index c430a9937..21e781a93 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-20.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGPROF\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-21.c
index 85005f690..1d51a5a45 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-21.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGSYS\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-22.c
index 265ad0e09..0fb79dbb6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-22.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGTRAP\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-23.c
index 32929b393..a0a15fd0e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-23.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGURG\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-24.c
index 01088578d..9ef152843 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-24.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGVTALRM\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-25.c
index 5ba537453..883148bfa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-25.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGXCPU\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-26.c
index d7b3f935e..1366eafac 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-26.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGXFSZ\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-27.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-27.c
index eb9cf3723..919d2db3a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-27.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-27.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGABRT\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-28.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-28.c
index 4cd91deab..efbb30581 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-28.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-28.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGUSR2\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-29.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-29.c
index d95a3735e..03b700c19 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-29.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-29.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGBUS\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-3.c
index 3f6920914..3e09de5e7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-3.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGBUS\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-30.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-30.c
index 060db2198..fd87d7b3a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-30.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-30.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGCHLD\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-31.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-31.c
index 95e601b06..a21bf3555 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-31.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-31.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGCONT\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-32.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-32.c
index 34715460a..908921095 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-32.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-32.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGFPE\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-33.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-33.c
index fda0d8d03..f4d52118e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-33.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-33.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGHUP\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-34.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-34.c
index bc2eaac9f..2f60a38e2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-34.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-34.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGILL\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-35.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-35.c
index bb3c4d6e5..b3bd83d19 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-35.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-35.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGINT\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-36.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-36.c
index c93ce7661..bbb419113 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-36.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-36.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGPIPE\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-37.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-37.c
index 1ea095ea6..5e0284953 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-37.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-37.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGQUIT\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-38.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-38.c
index f5b4e868a..23ab71fff 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-38.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-38.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGSEGV\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-39.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-39.c
index b46957274..2e6bb25e7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-39.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-39.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGTERM\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-4.c
index 414baff23..deaec27a6 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-4.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGCHLD\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-40.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-40.c
index c889aece7..925d450d0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-40.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-40.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGTSTP\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-41.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-41.c
index d8f203a24..671155b19 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-41.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-41.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGTTIN\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-42.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-42.c
index ebf74369f..e685e8d0c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-42.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-42.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGTTOU\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-43.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-43.c
index 74d6a9c83..3b96fd04d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-43.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-43.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGUSR1\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-44.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-44.c
index 4cd91deab..efbb30581 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-44.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-44.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGUSR2\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-45.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-45.c
index 4cd91deab..efbb30581 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-45.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-45.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGUSR2\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-46.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-46.c
index 95348b08f..2d5b9689b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-46.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-46.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGPROF\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-47.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-47.c
index 378fe88e5..dd0c3d977 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-47.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-47.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGSYS\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-48.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-48.c
index 7d32391f0..146c7d675 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-48.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-48.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGTRAP\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-49.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-49.c
index d1cdca8e4..52b5c4f79 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-49.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-49.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGURG\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-5.c
index caf3ad1c4..95966f47b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-5.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGCONT\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-50.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-50.c
index d597a73fa..f1eec2e66 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-50.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-50.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGVTALRM\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-51.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-51.c
index 8d0158466..b094860cb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-51.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-51.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGXCPU\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-52.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-52.c
index 11de44e6f..138816c63 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-52.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-52.c
@@ -29,7 +29,7 @@ void handler(int signo)
printf("Caught SIGXFSZ\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -54,7 +54,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-6.c
index 452f9a083..c3845604c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-6.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGFPE\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-7.c
index a4256dd30..e67da1d0d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-7.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGHUP\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-8.c
index aaac12f93..73ece6c01 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-8.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGILL\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-9.c
index 7560e1555..b3d30b83a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/12-9.c
@@ -31,7 +31,7 @@ void handler(int signo)
printf("Caught SIGINT\n");
- if (sigaltstack((stack_t *) 0, &ss) == -1) {
+ if (sigaltstack(NULL, &ss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -64,7 +64,7 @@ int main(void)
alt_ss.ss_size = SIGSTKSZ;
alt_ss.ss_flags = 0;
- if (sigaltstack(&alt_ss, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alt_ss, NULL) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-1.c
index c8a689e10..54a594b9b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-1.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGABRT\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-10.c
index b339bda74..67fcc7a40 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-10.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-10.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGPIPE\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-11.c
index 4e6a28540..64047ee76 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-11.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-11.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGQUIT\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-12.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-12.c
index 95ff9388b..371ed144f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-12.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-12.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGSEGV\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-13.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-13.c
index 9fb088b75..0db423925 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-13.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-13.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGTERM\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-14.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-14.c
index 0d09b2ec7..f28bca8bc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-14.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-14.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGTSTP\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-15.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-15.c
index 637bdf100..32515908b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-15.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-15.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGTTIN\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-16.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-16.c
index a151c8d28..88f10276a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-16.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-16.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGTTOU\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-17.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-17.c
index 26cff5d37..11e04d348 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-17.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-17.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGUSR1\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-18.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-18.c
index 55f89ca83..4368bb0a8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-18.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-18.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGUSR2\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-19.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-19.c
index 55f89ca83..4368bb0a8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-19.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-19.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGUSR2\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-2.c
index 55f89ca83..4368bb0a8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-2.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGUSR2\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-20.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-20.c
index e1748cda5..c7dac514b 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-20.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-20.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGPROF\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-21.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-21.c
index 9382efbb0..58c9013c2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-21.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-21.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGSYS\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-22.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-22.c
index 63252949e..73d218cf2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-22.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-22.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGTRAP\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-23.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-23.c
index 418f60e30..5327ad75f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-23.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-23.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGURG\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-24.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-24.c
index ec3480c02..88bfdae38 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-24.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-24.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGVTALRM\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-25.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-25.c
index 4f5e9b807..81fefc8d1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-25.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-25.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGXCPU\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-26.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-26.c
index ee76c2718..132835191 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-26.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-26.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGXFSZ\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-3.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-3.c
index 567cb81a1..6a337d97d 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-3.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-3.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGBUS\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-4.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-4.c
index 20c21c53e..f94bf2ca1 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-4.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-4.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGCHLD\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-5.c
index 9f994c6cd..756680457 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-5.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGCONT\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-6.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-6.c
index bf7848bc1..dcd730278 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-6.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-6.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGFPE\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-7.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-7.c
index edbf34b75..6cdbad06e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-7.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGHUP\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-8.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-8.c
index ab923d0fd..fff9162af 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-8.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-8.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGILL\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-9.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-9.c
index 5212e2dab..9f7f0ccab 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-9.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/13-9.c
@@ -30,7 +30,7 @@ void handler(int signo)
printf("Caught SIGINT\n");
- if (sigaltstack((stack_t *) 0, &oss) == -1) {
+ if (sigaltstack(NULL, &oss) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
exit(-1);
@@ -55,7 +55,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current) == -1) {
+ if (sigaltstack(NULL, &current) == -1) {
perror("Unexpected error while attempting to setup test "
"pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c
index b3d2c340b..f508b53c2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c
@@ -66,7 +66,7 @@ int main(void)
alternate_s.ss_flags = 0;
alternate_s.ss_size = SIGSTKSZ;
- if (sigaltstack(&alternate_s, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alternate_s, NULL) == -1) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c
index 0452414b5..d364c682a 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c
@@ -48,7 +48,7 @@ int main(void)
alternate_s.ss_flags = 0;
alternate_s.ss_size = SIGSTKSZ;
- if (sigaltstack(&alternate_s, (stack_t *) 0) != 0) {
+ if (sigaltstack(&alternate_s, NULL) != 0) {
printf("Test FAILED: sigaltstack didn't return 0.\n");
return PTS_FAIL;
}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c
index 2c16411f2..9581b0859 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c
@@ -57,7 +57,7 @@ int main(void)
altstack1.ss_flags = SS_DISABLE + 1;
altstack1.ss_size = SIGSTKSZ;
- if (sigaltstack(&altstack1, (stack_t *) 0) != -1) {
+ if (sigaltstack(&altstack1, NULL) != -1) {
printf("Test FAILED: Expected return value of -1.\n");
return PTS_FAIL;
}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c
index 27091584d..7ba9db2f2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c
@@ -61,7 +61,7 @@ int main(void)
*/
altstack1.ss_size = 2048 - 1;
- if (sigaltstack(&altstack1, (stack_t *) 0) != -1) {
+ if (sigaltstack(&altstack1, NULL) != -1) {
printf("Test FAILED: Expected return value of -1.\n");
return PTS_FAIL;
}
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c
index a1cb9ec1d..f60226f37 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c
@@ -36,7 +36,7 @@ void handler()
stack_t handler_s;
- if (sigaltstack((stack_t *) 0, &handler_s) == -1) {
+ if (sigaltstack(NULL, &handler_s) == -1) {
perror
("Unexpected error while attempting to setup test pre-conditions");
exit(PTS_UNRESOLVED);
@@ -70,7 +70,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &original_s) == -1) {
+ if (sigaltstack(NULL, &original_s) == -1) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
@@ -85,7 +85,7 @@ int main(void)
alternate_s.ss_flags = SS_DISABLE;
alternate_s.ss_size = SIGSTKSZ;
- if (sigaltstack(&alternate_s, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alternate_s, NULL) == -1) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c
index 3a3d7e3c0..c487184aa 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c
@@ -38,7 +38,7 @@ void handler()
stack_t handler_s;
- if (sigaltstack((stack_t *) 0, &handler_s) == -1) {
+ if (sigaltstack(NULL, &handler_s) == -1) {
perror
("Unexpected error while attempting to setup test pre-conditions");
exit(PTS_UNRESOLVED);
@@ -81,7 +81,7 @@ int main(void)
alternate_s.ss_flags = 0;
alternate_s.ss_size = SIGSTKSZ;
- if (sigaltstack(&alternate_s, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alternate_s, NULL) == -1) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c
index f75a03017..0b23a2ee8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c
@@ -48,13 +48,13 @@ int main(void)
alternate_s.ss_flags = 0;
alternate_s.ss_size = SIGSTKSZ;
- if (sigaltstack(&alternate_s, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alternate_s, NULL) == -1) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
}
- if (sigaltstack((stack_t *) 0, &current_s) == -1) {
+ if (sigaltstack(NULL, &current_s) == -1) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c
index 0b6e6f2ae..99ce89c9c 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c
@@ -33,7 +33,7 @@ void handler()
{
stack_t handler_s;
- if (sigaltstack((stack_t *) 0, &handler_s) == -1) {
+ if (sigaltstack(NULL, &handler_s) == -1) {
perror
("Unexpected error while attempting to setup test pre-conditions");
exit(PTS_UNRESOLVED);
@@ -69,7 +69,7 @@ int main(void)
alternate_s.ss_flags = 0;
alternate_s.ss_size = SIGSTKSZ;
- if (sigaltstack(&alternate_s, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alternate_s, NULL) == -1) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c
index 9319cd84a..0e7a9d9b7 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c
@@ -42,7 +42,7 @@ void handler()
altstack2.ss_flags = 0;
altstack2.ss_size = SIGSTKSZ;
- if (sigaltstack(&altstack2, (stack_t *) 0) != -1) {
+ if (sigaltstack(&altstack2, NULL) != -1) {
printf
("Test FAILED: Attempt to set change alternate stack while inside handler succeeded.\n");
exit(PTS_FAIL);
@@ -72,7 +72,7 @@ int main(void)
altstack1.ss_flags = 0;
altstack1.ss_size = SIGSTKSZ;
- if (sigaltstack(&altstack1, (stack_t *) 0) == -1) {
+ if (sigaltstack(&altstack1, NULL) == -1) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c
index 38a696561..86c768128 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c
@@ -69,7 +69,7 @@ int main(void)
alternate_s.ss_flags = SS_DISABLE;
alternate_s.ss_size = SIGSTKSZ;
- if (sigaltstack(&alternate_s, (stack_t *) 0) == -1) {
+ if (sigaltstack(&alternate_s, NULL) == -1) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/functional/mqueues/send_rev_2.c b/testcases/open_posix_testsuite/functional/mqueues/send_rev_2.c
index 2d524d6d6..395e564d7 100644
--- a/testcases/open_posix_testsuite/functional/mqueues/send_rev_2.c
+++ b/testcases/open_posix_testsuite/functional/mqueues/send_rev_2.c
@@ -50,7 +50,7 @@ int *send_1(void *mq)
printf("[%d] send '%s' in thread send_1. \n", i + 1,
s_msg_ptr[i]);
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
@@ -68,7 +68,7 @@ int *send_2(void *mq)
printf("[%d] send '%s' in thread send_2. \n", i + 1,
s_msg_ptr[i]);
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int *receive_1(void *mq)
@@ -85,7 +85,7 @@ int *receive_1(void *mq)
printf("[%d] receive '%s' in thread receive_1. \n", i + 1,
r_msg_ptr_1[i]);
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int *receive_2(void *mq)
@@ -102,7 +102,7 @@ int *receive_2(void *mq)
printf("[%d] receive '%s' in thread receive_2. \n", i + 1,
r_msg_ptr_2[i]);
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int main(int argc, char *argv[])
diff --git a/testcases/open_posix_testsuite/functional/semaphores/sem_conpro.c b/testcases/open_posix_testsuite/functional/semaphores/sem_conpro.c
index 4702152e8..f5f1abfcc 100644
--- a/testcases/open_posix_testsuite/functional/semaphores/sem_conpro.c
+++ b/testcases/open_posix_testsuite/functional/semaphores/sem_conpro.c
@@ -62,7 +62,7 @@ int *producer(buf_t * buf)
pthread_exit((void *)1);
}
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int *consumer(buf_t * buf)
diff --git a/testcases/open_posix_testsuite/functional/semaphores/sem_philosopher.c b/testcases/open_posix_testsuite/functional/semaphores/sem_philosopher.c
index 5e61a6d43..0905c6121 100644
--- a/testcases/open_posix_testsuite/functional/semaphores/sem_philosopher.c
+++ b/testcases/open_posix_testsuite/functional/semaphores/sem_philosopher.c
@@ -111,7 +111,7 @@ int philosopher(void *ID)
pthread_exit((void *)1);
}
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int main(int argc, char *argv[])
diff --git a/testcases/open_posix_testsuite/functional/semaphores/sem_readerwriter.c b/testcases/open_posix_testsuite/functional/semaphores/sem_readerwriter.c
index 99ffed443..24daeb342 100644
--- a/testcases/open_posix_testsuite/functional/semaphores/sem_readerwriter.c
+++ b/testcases/open_posix_testsuite/functional/semaphores/sem_readerwriter.c
@@ -83,7 +83,7 @@ int *reader(void *ID)
}
printf("Reader Thread [%d] exit...reader_count=%d \n", ThID,
reader_count);
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int *writer(void *ID)
@@ -102,7 +102,7 @@ int *writer(void *ID)
pthread_exit((void *)1);
}
printf("Writer Thread [%d] exit...\n", ThID);
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int main(int argc, char *argv[])
diff --git a/testcases/open_posix_testsuite/functional/semaphores/sem_sleepingbarber.c b/testcases/open_posix_testsuite/functional/semaphores/sem_sleepingbarber.c
index 5a07fe1c4..423b2fe90 100644
--- a/testcases/open_posix_testsuite/functional/semaphores/sem_sleepingbarber.c
+++ b/testcases/open_posix_testsuite/functional/semaphores/sem_sleepingbarber.c
@@ -89,7 +89,7 @@ void *barbers(void *unused)
}
}
- return (void *)0;
+ return NULL;
}
void *customers(void *ID)
@@ -132,7 +132,7 @@ void *customers(void *ID)
pthread_exit((void *)1);
}
}
- return (void *)0;
+ return NULL;
}
int main(int argc, char *argv[])
diff --git a/testcases/open_posix_testsuite/functional/threads/schedule/1-1.c b/testcases/open_posix_testsuite/functional/threads/schedule/1-1.c
index 46d2d7a26..73be55b98 100644
--- a/testcases/open_posix_testsuite/functional/threads/schedule/1-1.c
+++ b/testcases/open_posix_testsuite/functional/threads/schedule/1-1.c
@@ -106,7 +106,7 @@ void *hi_priority_thread(void *tmp)
if (low_done != 1)
woken_up = 1;
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
void *low_priority_thread(void *tmp)
@@ -141,7 +141,7 @@ void *low_priority_thread(void *tmp)
}
low_done = 1;
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int main()
diff --git a/testcases/open_posix_testsuite/functional/threads/schedule/1-2.c b/testcases/open_posix_testsuite/functional/threads/schedule/1-2.c
index 2966a4d3a..cfc46088d 100644
--- a/testcases/open_posix_testsuite/functional/threads/schedule/1-2.c
+++ b/testcases/open_posix_testsuite/functional/threads/schedule/1-2.c
@@ -111,7 +111,7 @@ void *hi_priority_thread(void *tmp)
printf(ERROR_PREFIX "pthread_mutex_unlock\n");
exit(PTS_UNRESOLVED);
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
void *low_priority_thread(void *tmp)
@@ -149,7 +149,7 @@ void *low_priority_thread(void *tmp)
break;
}
low_done = 1;
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int main()
diff --git a/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c b/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c
index 0d9a7c32a..80791b569 100644
--- a/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c
+++ b/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c
@@ -53,7 +53,7 @@ int *send(void *info)
printf("[%d] send '%s' in thread send [%d]. \n", i + 1,
s_msg_ptr[i], send_info.ThreadID);
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
@@ -71,13 +71,13 @@ int *receive(void *info)
if (-1 ==
mq_receive(recv_info.mqID, r_msg_ptr[i], MSG_SIZE, NULL)) {
perror("mq_receive doesn't return success \n");
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
printf("[%d] receive '%s' in thread receive recv [%d]. \n",
i + 1, r_msg_ptr[i], recv_info.ThreadID);
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int main(int argc, char *argv[])
diff --git a/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_2.c b/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_2.c
index 7ff5b8b8f..8dbe586a4 100644
--- a/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_2.c
+++ b/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_2.c
@@ -49,7 +49,7 @@ int *send(void *ID)
printf("[%d] send '%s' in thread send %d. \n", i + 1,
s_msg_ptr[i], ThreadID);
}
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
@@ -69,7 +69,7 @@ int *receive(void *ID)
r_msg_ptr[ThreadID][i], ThreadID);
}
printf("receive[%d] quit ...\n", ThreadID);
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int main(int argc, char *argv[])
diff --git a/testcases/open_posix_testsuite/stress/semaphores/multi_con_pro.c b/testcases/open_posix_testsuite/stress/semaphores/multi_con_pro.c
index 926a84484..f986707d0 100644
--- a/testcases/open_posix_testsuite/stress/semaphores/multi_con_pro.c
+++ b/testcases/open_posix_testsuite/stress/semaphores/multi_con_pro.c
@@ -100,7 +100,7 @@ int *producer(void *ID)
pthread_exit((void *)1);
}
printf("Producer %d exit... \n", ThreadID);
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int *consumer(void *ID)
@@ -140,7 +140,7 @@ int *consumer(void *ID)
while (data != -1);
printf("Consumer %d exit... \n", ThreadID);
- pthread_exit((void *)0);
+ pthread_exit(NULL);
}
int main(int argc, char *argv[])
diff --git a/testcases/realtime/func/async_handler/async_handler.c b/testcases/realtime/func/async_handler/async_handler.c
index 3c1bfdd90..70ef56cc1 100644
--- a/testcases/realtime/func/async_handler/async_handler.c
+++ b/testcases/realtime/func/async_handler/async_handler.c
@@ -192,8 +192,8 @@ int main(int argc, char *argv[])
printf("Running %d iterations\n", iterations);
handler_id =
- create_fifo_thread(handler_thread, (void *)0, HANDLER_PRIO);
- signal_id = create_fifo_thread(signal_thread, (void *)0, SIGNAL_PRIO);
+ create_fifo_thread(handler_thread, NULL, HANDLER_PRIO);
+ signal_id = create_fifo_thread(signal_thread, NULL, SIGNAL_PRIO);
join_threads();
diff --git a/testcases/realtime/func/async_handler/async_handler_jk.c b/testcases/realtime/func/async_handler/async_handler_jk.c
index df4ff1bc8..4d8721822 100644
--- a/testcases/realtime/func/async_handler/async_handler_jk.c
+++ b/testcases/realtime/func/async_handler/async_handler_jk.c
@@ -144,7 +144,7 @@ int main(int argc, char *argv[])
pass_criteria = PASS_US;
rt_init("h", parse_args, argc, argv);
- aes_id = create_fifo_thread(async_event_server, (void *)0, 83);
+ aes_id = create_fifo_thread(async_event_server, NULL, 83);
server = get_thread(aes_id);
user_id =
diff --git a/testcases/realtime/func/async_handler/async_handler_tsc.c b/testcases/realtime/func/async_handler/async_handler_tsc.c
index c51a3b4ca..7da4324a5 100644
--- a/testcases/realtime/func/async_handler/async_handler_tsc.c
+++ b/testcases/realtime/func/async_handler/async_handler_tsc.c
@@ -216,8 +216,8 @@ int main(int argc, char *argv[])
atomic_set(CHILD_START, &step);
handler_id =
- create_fifo_thread(handler_thread, (void *)0, HANDLER_PRIO);
- signal_id = create_fifo_thread(signal_thread, (void *)0, SIGNAL_PRIO);
+ create_fifo_thread(handler_thread, NULL, HANDLER_PRIO);
+ signal_id = create_fifo_thread(signal_thread, NULL, SIGNAL_PRIO);
join_threads();
diff --git a/testcases/realtime/func/pi-tests/testpi-7.c b/testcases/realtime/func/pi-tests/testpi-7.c
index e9e286dde..20908b662 100644
--- a/testcases/realtime/func/pi-tests/testpi-7.c
+++ b/testcases/realtime/func/pi-tests/testpi-7.c
@@ -291,10 +291,10 @@ int main(int argc, char *argv[])
init_pi_mutex(&pi_mutex);
- create_fifo_thread(low_prio_rt_thread, (void *)0, LOW_PRIO);
+ create_fifo_thread(low_prio_rt_thread, NULL, LOW_PRIO);
create_fifo_thread(high_prio_rt_thread, (void *)iterations, HIGH_PRIO);
for (i = 0; i < med_threads; i++) {
- create_fifo_thread(med_prio_thread, (void *)0, MED_PRIO);
+ create_fifo_thread(med_prio_thread, NULL, MED_PRIO);
}
while (phase_flag != END_OF_GAME)
diff --git a/testcases/realtime/func/pi_perf/pi_perf.c b/testcases/realtime/func/pi_perf/pi_perf.c
index daa76434a..45cf8ed15 100644
--- a/testcases/realtime/func/pi_perf/pi_perf.c
+++ b/testcases/realtime/func/pi_perf/pi_perf.c
@@ -255,10 +255,10 @@ int main(int argc, char *argv[])
init_pi_mutex(&lock);
- if ((ret = create_fifo_thread(low_prio_thread, (void *)0, LOWPRIO)) < 0)
+ if ((ret = create_fifo_thread(low_prio_thread, NULL, LOWPRIO)) < 0)
exit(ret);
if ((ret =
- create_fifo_thread(high_prio_thread, (void *)0, HIGHPRIO)) < 0)
+ create_fifo_thread(high_prio_thread, NULL, HIGHPRIO)) < 0)
exit(ret);
for (i = 0; i < num_busy; i++) {
diff --git a/testcases/realtime/func/prio-preempt/prio-preempt.c b/testcases/realtime/func/prio-preempt/prio-preempt.c
index a43c067be..9bd5e7ad8 100644
--- a/testcases/realtime/func/prio-preempt/prio-preempt.c
+++ b/testcases/realtime/func/prio-preempt/prio-preempt.c
@@ -238,7 +238,7 @@ void *master_thread(void *arg)
if (int_threads) {
pri_boost = 90;
for (i = 0; i < rt_threads; i++) {
- create_fifo_thread(int_thread, (void *)0,
+ create_fifo_thread(int_thread, NULL,
sched_get_priority_min(SCHED_FIFO) +
pri_boost);
}
@@ -318,7 +318,7 @@ int main(int argc, char *argv[])
printf("Worker Threads: %d\n\n", NUM_WORKERS);
pri_boost = 81;
- create_fifo_thread(master_thread, (void *)0,
+ create_fifo_thread(master_thread, NULL,
sched_get_priority_min(SCHED_FIFO) + pri_boost);
/* wait for threads to complete */
diff --git a/testcases/realtime/func/pthread_kill_latency/pthread_kill_latency.c b/testcases/realtime/func/pthread_kill_latency/pthread_kill_latency.c
index 70d03ca79..08b6488d3 100644
--- a/testcases/realtime/func/pthread_kill_latency/pthread_kill_latency.c
+++ b/testcases/realtime/func/pthread_kill_latency/pthread_kill_latency.c
@@ -294,7 +294,7 @@ int main(int argc, char *argv[])
debug(DBG_DEBUG, "Main creating threads\n");
fflush(stdout);
- thr_id1 = create_fifo_thread(signal_receiving_thread, (void *)0, PRIO);
+ thr_id1 = create_fifo_thread(signal_receiving_thread, NULL, PRIO);
thr_id2 =
create_fifo_thread(signal_sending_thread,
(void *)(intptr_t) thr_id1, PRIO - 1);
diff --git a/testcases/realtime/func/sched_latency/sched_latency.c b/testcases/realtime/func/sched_latency/sched_latency.c
index 94c34d2b6..d19d5889a 100644
--- a/testcases/realtime/func/sched_latency/sched_latency.c
+++ b/testcases/realtime/func/sched_latency/sched_latency.c
@@ -288,7 +288,7 @@ int main(int argc, char *argv[])
/* wait one quarter second to execute */
start = rt_gettime() + 250 * NS_PER_MS;
- per_id = create_fifo_thread(periodic_thread, (void *)0, PRIO);
+ per_id = create_fifo_thread(periodic_thread, NULL, PRIO);
join_thread(per_id);
join_threads();
diff --git a/testcases/realtime/stress/pi-tests/lookup_pi_state.c b/testcases/realtime/stress/pi-tests/lookup_pi_state.c
index d1575dce0..83781d80e 100644
--- a/testcases/realtime/stress/pi-tests/lookup_pi_state.c
+++ b/testcases/realtime/stress/pi-tests/lookup_pi_state.c
@@ -184,7 +184,7 @@ int main(int argc, char *argv[])
rt_init("h", parse_args, argc, argv);
- create_other_thread(master_thread, (void *)0);
+ create_other_thread(master_thread, NULL);
/* wait for the slaves to quit */
while (atomic_get(&slave_order_c) < NUM_SLAVES)
diff --git a/utils/benchmark/ebizzy-0.3/ebizzy.c b/utils/benchmark/ebizzy-0.3/ebizzy.c
index 61d0b7d54..5bb8eff56 100644
--- a/utils/benchmark/ebizzy-0.3/ebizzy.c
+++ b/utils/benchmark/ebizzy-0.3/ebizzy.c
@@ -241,7 +241,7 @@ static void *alloc_mem(size_t size)
int err = 0;
if (always_mmap) {
- p = mmap((void *)0, size, (PROT_READ | PROT_WRITE),
+ p = mmap(NULL, size, (PROT_READ | PROT_WRITE),
(MAP_PRIVATE | MAP_ANONYMOUS), -1, 0);
if (p == MAP_FAILED)
err = 1;