提交 d7d5a6d0 编写于 作者: K kizune

8029698: Update Poller demo

Reviewed-by: dcubed
上级 94771d2a
...@@ -318,7 +318,7 @@ JNIEXPORT void JNICALL Java_Poller_nativeDestroyPoller ...@@ -318,7 +318,7 @@ JNIEXPORT void JNICALL Java_Poller_nativeDestroyPoller
ioevent_t *ioeh; ioevent_t *ioeh;
if (handle < 0 || handle > MAX_HANDLES) if (handle < 0 || handle >= MAX_HANDLES)
{ {
STATE_EXCEPTION("DestroyPoller - handle out of range"); STATE_EXCEPTION("DestroyPoller - handle out of range");
return; return;
...@@ -366,7 +366,7 @@ JNIEXPORT jint JNICALL Java_Poller_nativeAddFd ...@@ -366,7 +366,7 @@ JNIEXPORT jint JNICALL Java_Poller_nativeAddFd
int retval; int retval;
ioevent_t *ioeh; ioevent_t *ioeh;
if (handle < 0 || handle > MAX_HANDLES) if (handle < 0 || handle >= MAX_HANDLES)
return STATE_EXCEPTION("AddFd - handle out of range"); return STATE_EXCEPTION("AddFd - handle out of range");
ioeh = &IOE_handles[handle]; ioeh = &IOE_handles[handle];
...@@ -459,7 +459,7 @@ jint addfd(JNIEnv *env, ioevent_t *ioeh, jint fd, jshort events) ...@@ -459,7 +459,7 @@ jint addfd(JNIEnv *env, ioevent_t *ioeh, jint fd, jshort events)
return fd; return fd;
} }
/* /*
* Class: Poller * Class: Poller
* Method: nativeRemoveFd * Method: nativeRemoveFd
* Signature: (II)I * Signature: (II)I
...@@ -469,7 +469,7 @@ JNIEXPORT jint JNICALL Java_Poller_nativeRemoveFd ...@@ -469,7 +469,7 @@ JNIEXPORT jint JNICALL Java_Poller_nativeRemoveFd
{ {
ioevent_t *ioeh; ioevent_t *ioeh;
if (handle < 0 || handle > MAX_HANDLES) if (handle < 0 || handle >= MAX_HANDLES)
return STATE_EXCEPTION("RemoveFd - handle out of range"); return STATE_EXCEPTION("RemoveFd - handle out of range");
ioeh = &IOE_handles[handle]; ioeh = &IOE_handles[handle];
...@@ -576,7 +576,7 @@ JNIEXPORT jint JNICALL Java_Poller_nativeIsMember ...@@ -576,7 +576,7 @@ JNIEXPORT jint JNICALL Java_Poller_nativeIsMember
int i; int i;
ioevent_t *ioeh; ioevent_t *ioeh;
if (handle < 0 || handle > MAX_HANDLES) if (handle < 0 || handle >= MAX_HANDLES)
return STATE_EXCEPTION("IsMember - handle out of range"); return STATE_EXCEPTION("IsMember - handle out of range");
ioeh = &IOE_handles[handle]; ioeh = &IOE_handles[handle];
...@@ -629,7 +629,7 @@ JNIEXPORT jint JNICALL Java_Poller_nativeWait ...@@ -629,7 +629,7 @@ JNIEXPORT jint JNICALL Java_Poller_nativeWait
ioevent_t *ioeh; ioevent_t *ioeh;
jboolean isCopy1,isCopy2; jboolean isCopy1,isCopy2;
if (handle < 0 || handle > MAX_HANDLES) if (handle < 0 || handle >= MAX_HANDLES)
return STATE_EXCEPTION("nativeWait - handle out of range"); return STATE_EXCEPTION("nativeWait - handle out of range");
ioeh = &IOE_handles[handle]; ioeh = &IOE_handles[handle];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册