From cb344a7aa3c347182904d5e9cc5da88be4baa445 Mon Sep 17 00:00:00 2001 From: Alexander Zuev Date: Thu, 19 Dec 2013 14:57:13 +0400 Subject: [PATCH] 8029697: Update Poller demo Reviewed-by: dcubed --- jdk/src/solaris/demo/jni/Poller/Poller.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jdk/src/solaris/demo/jni/Poller/Poller.c b/jdk/src/solaris/demo/jni/Poller/Poller.c index 6a51212d962..5c627ac57ca 100644 --- a/jdk/src/solaris/demo/jni/Poller/Poller.c +++ b/jdk/src/solaris/demo/jni/Poller/Poller.c @@ -318,7 +318,7 @@ JNIEXPORT void JNICALL Java_Poller_nativeDestroyPoller ioevent_t *ioeh; - if (handle < 0 || handle > MAX_HANDLES) + if (handle < 0 || handle >= MAX_HANDLES) { STATE_EXCEPTION("DestroyPoller - handle out of range"); return; @@ -366,7 +366,7 @@ JNIEXPORT jint JNICALL Java_Poller_nativeAddFd int retval; ioevent_t *ioeh; - if (handle < 0 || handle > MAX_HANDLES) + if (handle < 0 || handle >= MAX_HANDLES) return STATE_EXCEPTION("AddFd - handle out of range"); ioeh = &IOE_handles[handle]; @@ -459,7 +459,7 @@ jint addfd(JNIEnv *env, ioevent_t *ioeh, jint fd, jshort events) return fd; } - /* +/* * Class: Poller * Method: nativeRemoveFd * Signature: (II)I @@ -469,7 +469,7 @@ JNIEXPORT jint JNICALL Java_Poller_nativeRemoveFd { ioevent_t *ioeh; - if (handle < 0 || handle > MAX_HANDLES) + if (handle < 0 || handle >= MAX_HANDLES) return STATE_EXCEPTION("RemoveFd - handle out of range"); ioeh = &IOE_handles[handle]; @@ -576,7 +576,7 @@ JNIEXPORT jint JNICALL Java_Poller_nativeIsMember int i; ioevent_t *ioeh; - if (handle < 0 || handle > MAX_HANDLES) + if (handle < 0 || handle >= MAX_HANDLES) return STATE_EXCEPTION("IsMember - handle out of range"); ioeh = &IOE_handles[handle]; @@ -629,7 +629,7 @@ JNIEXPORT jint JNICALL Java_Poller_nativeWait ioevent_t *ioeh; jboolean isCopy1,isCopy2; - if (handle < 0 || handle > MAX_HANDLES) + if (handle < 0 || handle >= MAX_HANDLES) return STATE_EXCEPTION("nativeWait - handle out of range"); ioeh = &IOE_handles[handle];