1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Merge branch '3.1' into 3.3

This commit is contained in:
Georg Richter
2024-05-08 11:43:18 +02:00
5 changed files with 6 additions and 6 deletions

View File

@@ -140,7 +140,7 @@ my_ssl_async_check_result(int res, struct mysql_async_context *b, MARIADB_SSL *c
{ {
int ssl_err; int ssl_err;
b->events_to_wait_for= 0; b->events_to_wait_for= 0;
if (res >= 0) if (res > 0)
return 1; return 1;
ssl_err= SSL_get_error(ssl, res); ssl_err= SSL_get_error(ssl, res);
if (ssl_err == SSL_ERROR_WANT_READ) if (ssl_err == SSL_ERROR_WANT_READ)

View File

@@ -533,7 +533,7 @@ ma_tls_async_check_result(int res, struct mysql_async_context *b, SSL *ssl)
{ {
int ssl_err; int ssl_err;
b->events_to_wait_for= 0; b->events_to_wait_for= 0;
if (res >= 0) if (res > 0)
return 1; return 1;
ssl_err= SSL_get_error(ssl, res); ssl_err= SSL_get_error(ssl, res);
if (ssl_err == SSL_ERROR_WANT_READ) if (ssl_err == SSL_ERROR_WANT_READ)

View File

@@ -279,11 +279,11 @@ MA_FILE *ma_rio_open(const char *url,const char *operation)
MA_REMOTE_FILE *rf; MA_REMOTE_FILE *rf;
(void)operation; (void)operation;
if (!(file = (MA_FILE *)calloc(sizeof(MA_FILE), 1))) if (!(file = (MA_FILE *)calloc(1, sizeof(MA_FILE))))
return NULL; return NULL;
file->type= MA_FILE_REMOTE; file->type= MA_FILE_REMOTE;
if (!(file->ptr= rf= (MA_REMOTE_FILE *)calloc(sizeof(MA_REMOTE_FILE), 1))) if (!(file->ptr= rf= (MA_REMOTE_FILE *)calloc(1, sizeof(MA_REMOTE_FILE))))
{ {
free(file); free(file);
return NULL; return NULL;

View File

@@ -39,7 +39,7 @@
#include <sys/un.h> #include <sys/un.h>
#endif #endif
#ifdef HAVE_POLL #ifdef HAVE_POLL
#include <sys/poll.h> #include <poll.h>
#endif #endif
#ifdef HAVE_SYS_IOCTL_H #ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h> #include <sys/ioctl.h>

View File

@@ -132,7 +132,7 @@ static TRACE_INFO *get_trace_info(unsigned long thread_id)
info= (TRACE_INFO *)info->next; info= (TRACE_INFO *)info->next;
} }
if (!(info= (TRACE_INFO *)calloc(sizeof(TRACE_INFO), 1))) if (!(info= (TRACE_INFO *)calloc(1, sizeof(TRACE_INFO))))
return NULL; return NULL;
info->thread_id= thread_id; info->thread_id= thread_id;
info->next= trace_info; info->next= trace_info;