remove superfluous braces and re-indent somewhat

This commit is contained in:
Daniel Stenberg
2009-08-20 00:59:23 +02:00
parent d8b6f3c7b8
commit 4b1cb4e95e

View File

@@ -708,7 +708,6 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
break; break;
case SSH_MSG_CHANNEL_EOF: case SSH_MSG_CHANNEL_EOF:
{
session->packAdd_channel = session->packAdd_channel =
_libssh2_channel_locate(session, _libssh2_ntohu32(data + 1)); _libssh2_channel_locate(session, _libssh2_ntohu32(data + 1));
@@ -729,11 +728,8 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
LIBSSH2_FREE(session, data); LIBSSH2_FREE(session, data);
session->packAdd_state = libssh2_NB_state_idle; session->packAdd_state = libssh2_NB_state_idle;
return 0; return 0;
}
break;
case SSH_MSG_CHANNEL_REQUEST: case SSH_MSG_CHANNEL_REQUEST:
{
if (_libssh2_ntohu32(data + 5) == sizeof("exit-status") - 1 if (_libssh2_ntohu32(data + 5) == sizeof("exit-status") - 1
&& !memcmp("exit-status", data + 9, && !memcmp("exit-status", data + 9,
sizeof("exit-status") - 1)) { sizeof("exit-status") - 1)) {
@@ -757,11 +753,9 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
session->packAdd_state = libssh2_NB_state_idle; session->packAdd_state = libssh2_NB_state_idle;
return 0; return 0;
} }
}
break; break;
case SSH_MSG_CHANNEL_CLOSE: case SSH_MSG_CHANNEL_CLOSE:
{
session->packAdd_channel = session->packAdd_channel =
_libssh2_channel_locate(session, _libssh2_ntohu32(data + 1)); _libssh2_channel_locate(session, _libssh2_ntohu32(data + 1));
@@ -783,8 +777,6 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
LIBSSH2_FREE(session, data); LIBSSH2_FREE(session, data);
session->packAdd_state = libssh2_NB_state_idle; session->packAdd_state = libssh2_NB_state_idle;
return 0; return 0;
}
break;
case SSH_MSG_CHANNEL_OPEN: case SSH_MSG_CHANNEL_OPEN:
if ((datalen >= (sizeof("forwarded-tcpip") + 4)) && if ((datalen >= (sizeof("forwarded-tcpip") + 4)) &&