summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2003-05-23 22:42:21 +0000
committerwtc%netscape.com <devnull@localhost>2003-05-23 22:42:21 +0000
commitf6ff609ca48b1d19305aba22d21dda3b05e3927c (patch)
tree5f62dedda244c9de030e46e50e0adeb0edaa1f2b
parent23006532afd04b17adbde3d551bb3b190d31b7ca (diff)
downloadnspr-hg-f6ff609ca48b1d19305aba22d21dda3b05e3927c.tar.gz
Bug 206815: fixed a benign UMR in the PR_Poll implementations based on
poll(). We should initialize the events field of the pollfd structure when we set the fd field to -1 even though the events field is ignored if the fd field is negative. Modified Files: ptio.c uxpoll.c Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-rw-r--r--pr/src/md/unix/uxpoll.c1
-rw-r--r--pr/src/pthreads/ptio.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/pr/src/md/unix/uxpoll.c b/pr/src/md/unix/uxpoll.c
index c504cd4d..a95e4558 100644
--- a/pr/src/md/unix/uxpoll.c
+++ b/pr/src/md/unix/uxpoll.c
@@ -173,6 +173,7 @@ static PRInt32 NativeThreadPoll(
{
/* make poll() ignore this entry */
syspoll[index].fd = -1;
+ syspoll[index].events = 0;
pds[index].out_flags = 0;
}
}
diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c
index 8267148b..3b9e74ad 100644
--- a/pr/src/pthreads/ptio.c
+++ b/pr/src/pthreads/ptio.c
@@ -3832,6 +3832,7 @@ static PRInt32 _pr_poll_with_poll(
{
/* make poll() ignore this entry */
syspoll[index].fd = -1;
+ syspoll[index].events = 0;
pds[index].out_flags = 0;
}
}