Skip to content

Commit

Permalink
Fix copy/paste error
Browse files Browse the repository at this point in the history
(errno == EAGAIN) was checked twice, where it should have been checking
for EAGAIN or EWOULDBLOCK.
  • Loading branch information
marcone committed Nov 7, 2024
1 parent f459eba commit 8c9c6c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/usb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int write_usb(usb_gadget * ctx, int channel, unsigned char * buffer, int size)
{
ret = write (ctx->ep_handles[channel], buffer, size);
}
}while( ret < 0 && ( (errno == EAGAIN) || (errno == EAGAIN) ) && !mtp_context->cancel_req );
}while( ret < 0 && ( (errno == EAGAIN) || (errno == EWOULDBLOCK) ) && !mtp_context->cancel_req );
fcntl(ctx->ep_handles[channel], F_SETFL, fcntl(ctx->ep_handles[channel], F_GETFL) & ~O_NONBLOCK);
#else

Expand Down

0 comments on commit 8c9c6c8

Please sign in to comment.