Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A small bit of cleanup. #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ static int host_get_peer(lua_State *l) {

size_t peer_index = (size_t) luaL_checkint(l, 2) - 1;

if (peer_index < 0 || peer_index >= host->peerCount) {
if (peer_index >= host->peerCount) {
luaL_argerror (l, 2, "Invalid peer index");
}

Expand Down Expand Up @@ -768,10 +768,6 @@ static const struct luaL_Reg enet_peer_funcs [] = {
{NULL, NULL}
};

static const struct luaL_Reg enet_event_funcs [] = {
{NULL, NULL}
};

int luaopen_enet(lua_State *l) {
enet_initialize();
atexit(enet_deinitialize);
Expand Down