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

More coverity fixes

This commit is contained in:
Georg Richter
2018-07-13 12:30:13 +02:00
parent 77fc17b7aa
commit c95f86e882
11 changed files with 121 additions and 25 deletions

View File

@@ -33,4 +33,23 @@ size_t ma_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
my_bool *error);
char *ma_ll2str(long long val,char *dst, int radix);
#define MAX_ENV_SIZE 1024
static inline my_bool ma_check_env_str(const char *env)
{
unsigned int i;
if (!env)
return 1;
for (i=0; i < MAX_ENV_SIZE; i++)
{
if (env[i] == 0)
break;
}
if (i >= MAX_ENV_SIZE)
return 1;
return 0;
}
#endif