libnetsock: resolve Coverity warnings
This commit is contained in:
parent
ebc85e54c4
commit
378164d359
1 changed files with 5 additions and 5 deletions
|
@ -319,19 +319,19 @@ static void socket_request_socket(struct socket * sock, message * m)
|
||||||
|
|
||||||
switch (m->m_type) {
|
switch (m->m_type) {
|
||||||
case DEV_READ_S:
|
case DEV_READ_S:
|
||||||
if (sock && sock->ops && sock->ops->read)
|
if (sock->ops && sock->ops->read)
|
||||||
sock->ops->read(sock, m, blocking);
|
sock->ops->read(sock, m, blocking);
|
||||||
else
|
else
|
||||||
send_reply(m, EINVAL);
|
send_reply(m, EINVAL);
|
||||||
return;
|
return;
|
||||||
case DEV_WRITE_S:
|
case DEV_WRITE_S:
|
||||||
if (sock && sock->ops && sock->ops->write)
|
if (sock->ops && sock->ops->write)
|
||||||
sock->ops->write(sock, m, blocking);
|
sock->ops->write(sock, m, blocking);
|
||||||
else
|
else
|
||||||
send_reply(m, EINVAL);
|
send_reply(m, EINVAL);
|
||||||
return;
|
return;
|
||||||
case DEV_IOCTL_S:
|
case DEV_IOCTL_S:
|
||||||
if (sock && sock->ops && sock->ops->ioctl)
|
if (sock->ops && sock->ops->ioctl)
|
||||||
sock->ops->ioctl(sock, m, blocking);
|
sock->ops->ioctl(sock, m, blocking);
|
||||||
else
|
else
|
||||||
send_reply(m, EINVAL);
|
send_reply(m, EINVAL);
|
||||||
|
@ -352,7 +352,7 @@ void socket_request(message * m)
|
||||||
return;
|
return;
|
||||||
case DEV_CLOSE:
|
case DEV_CLOSE:
|
||||||
sock = get_sock(m->DEVICE);
|
sock = get_sock(m->DEVICE);
|
||||||
if (sock && sock->ops && sock->ops->close) {
|
if (sock->ops && sock->ops->close) {
|
||||||
sock->flags &= ~SOCK_FLG_OP_PENDING;
|
sock->flags &= ~SOCK_FLG_OP_PENDING;
|
||||||
sock->mess = *m;
|
sock->mess = *m;
|
||||||
sock->ops->close(sock, m);
|
sock->ops->close(sock, m);
|
||||||
|
@ -419,7 +419,7 @@ void socket_request(message * m)
|
||||||
sock = get_sock(m->DEVICE);
|
sock = get_sock(m->DEVICE);
|
||||||
assert(sock->select_ep == NONE || sock->select_ep == m->m_source);
|
assert(sock->select_ep == NONE || sock->select_ep == m->m_source);
|
||||||
|
|
||||||
if (sock && sock->ops && sock->ops->select) {
|
if (sock->ops && sock->ops->select) {
|
||||||
sock->select_ep = m->m_source;
|
sock->select_ep = m->m_source;
|
||||||
sock->ops->select(sock, m);
|
sock->ops->select(sock, m);
|
||||||
if (!sock_select_set(sock))
|
if (!sock_select_set(sock))
|
||||||
|
|
Loading…
Reference in a new issue