code police: make the code use less than 80 columns
This commit is contained in:
parent
20e969d2e0
commit
2fd044fdf5
23
src/misc.c
23
src/misc.c
@ -114,7 +114,8 @@ _libssh2_recv(libssh2_socket_t socket, void *buffer, size_t length, int flags)
|
||||
* to set errno
|
||||
*/
|
||||
ssize_t
|
||||
_libssh2_send(libssh2_socket_t socket, const void *buffer, size_t length, int flags)
|
||||
_libssh2_send(libssh2_socket_t socket, const void *buffer, size_t length,
|
||||
int flags)
|
||||
{
|
||||
ssize_t rc = send(socket, buffer, length, flags);
|
||||
#ifdef WIN32
|
||||
@ -259,8 +260,7 @@ libssh2_base64_decode(LIBSSH2_SESSION *session, char **data,
|
||||
/* Invalid -- We have a byte which belongs exclusively to a partial
|
||||
octet */
|
||||
LIBSSH2_FREE(session, *data);
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_INVAL,
|
||||
"Invalid data (byte belonging to partial octet)");
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_INVAL, "Invalid base64");
|
||||
}
|
||||
|
||||
*datalen = len;
|
||||
@ -356,7 +356,8 @@ libssh2_trace(LIBSSH2_SESSION * session, int bitmask)
|
||||
}
|
||||
|
||||
LIBSSH2_API int
|
||||
libssh2_trace_sethandler(LIBSSH2_SESSION *session, void* handler_context, libssh2_trace_handler_func callback)
|
||||
libssh2_trace_sethandler(LIBSSH2_SESSION *session, void* handler_context,
|
||||
libssh2_trace_handler_func callback)
|
||||
{
|
||||
session->tracehandler = callback;
|
||||
session->tracehandler_context = handler_context;
|
||||
@ -392,7 +393,8 @@ _libssh2_debug(LIBSSH2_SESSION * session, int context, const char *format, ...)
|
||||
}
|
||||
|
||||
/* Find the first matching context string for this message */
|
||||
for (contextindex = 0; contextindex < ARRAY_SIZE(contexts); contextindex++) {
|
||||
for (contextindex = 0; contextindex < ARRAY_SIZE(contexts);
|
||||
contextindex++) {
|
||||
if ((context & (1 << contextindex)) != 0) {
|
||||
contexttext = contexts[contextindex];
|
||||
break;
|
||||
@ -413,11 +415,11 @@ _libssh2_debug(LIBSSH2_SESSION * session, int context, const char *format, ...)
|
||||
buffer[len] = '\n';
|
||||
va_end(vargs);
|
||||
|
||||
if (session->tracehandler) {
|
||||
(session->tracehandler)(session, session->tracehandler_context, buffer, len + 1);
|
||||
} else {
|
||||
if (session->tracehandler)
|
||||
(session->tracehandler)(session, session->tracehandler_context, buffer,
|
||||
len + 1);
|
||||
else
|
||||
write(2, buffer, len + 1);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
@ -430,7 +432,8 @@ libssh2_trace(LIBSSH2_SESSION * session, int bitmask)
|
||||
}
|
||||
|
||||
LIBSSH2_API int
|
||||
libssh2_trace_sethandler(LIBSSH2_SESSION *session, void* handler_context, libssh2_trace_handler_func callback)
|
||||
libssh2_trace_sethandler(LIBSSH2_SESSION *session, void* handler_context,
|
||||
libssh2_trace_handler_func callback)
|
||||
{
|
||||
(void) session;
|
||||
(void) handler_context;
|
||||
|
Loading…
Reference in New Issue
Block a user