Skip to content

Commit

Permalink
channels: accept channel 0 in chnl_connect
Browse files Browse the repository at this point in the history
Signed-off-by: Jalal Mostafa <[email protected]>
  • Loading branch information
jalalmostafa committed Jun 11, 2024
1 parent 9413087 commit 714e681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cnet/chnl/cnet_chnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,10 @@ chnl_connect(int cd, struct sockaddr *sa, int namelen)
struct protosw_entry *psw;
struct in_caddr faddr = {0};

if (!cd || this_stk == NULL)
if (!ch || this_stk == NULL)
return __errno_set(EFAULT);

if (!name || (namelen > (int)sizeof(struct in_caddr)) || !ch || !ch->ch_proto)
if (!name || (namelen > (int)sizeof(struct in_caddr)) || !ch->ch_proto)
CNE_ERR_RET_VAL(__errno_set(EINVAL), "Channel name %p or len %d != %ld\n", name, namelen,
sizeof(struct in_caddr));

Expand Down

0 comments on commit 714e681

Please sign in to comment.