mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-21 14:00:51 +03:00
rename libssh2_error to the correct _libssh2_error
We reserve ^libssh2_ for public symbols and we use _libssh2 as prefix for internal ones. I fixed the intendation of all these edits with emacs afterwards, which then changed it slightly more than just _libssh2_error() expressions but I didn't see any obvious problems.
This commit is contained in:
10
src/misc.c
10
src/misc.c
@@ -49,7 +49,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
int libssh2_error(LIBSSH2_SESSION* session, int errcode, const char* errmsg)
|
||||
int _libssh2_error(LIBSSH2_SESSION* session, int errcode, const char* errmsg)
|
||||
{
|
||||
session->err_msg = errmsg;
|
||||
session->err_code = errcode;
|
||||
@@ -201,8 +201,8 @@ libssh2_base64_decode(LIBSSH2_SESSION *session, char **data,
|
||||
*data = LIBSSH2_ALLOC(session, (3 * src_len / 4) + 1);
|
||||
d = (unsigned char *) *data;
|
||||
if (!d) {
|
||||
return libssh2_error(session, LIBSSH2_ERROR_ALLOC,
|
||||
"Unable to allocate memory for base64 decoding");
|
||||
return _libssh2_error(session, LIBSSH2_ERROR_ALLOC,
|
||||
"Unable to allocate memory for base64 decoding");
|
||||
}
|
||||
|
||||
for(s = (unsigned char *) src; ((char *) s) < (src + src_len); s++) {
|
||||
@@ -230,8 +230,8 @@ 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 data (byte belonging to partial octet)");
|
||||
}
|
||||
|
||||
*datalen = len;
|
||||
|
||||
Reference in New Issue
Block a user