Skip to content

Commit

Permalink
remove redundant check
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Liptak <squeek502@hotmail.com>
  • Loading branch information
Bilal2453 and squeek502 committed Mar 3, 2023
1 parent 71d38d6 commit 0ca43ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static uv_stream_t* luv_check_stream(lua_State* L, int index) {
if (!isStream) goto fail;
// cast the userdata to uv_stream_t
handle = *(uv_stream_t**)udata;
if (!handle || !handle->data) goto fail;
if (!handle->data) goto fail;
return handle;

fail: luaL_argerror(L, index, "Expected uv_stream userdata");
Expand Down

0 comments on commit 0ca43ac

Please sign in to comment.