diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2017-12-18 17:15:48 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2017-12-19 19:10:54 +0400 |
commit | 2cd316911309e3db4007aa224f7874bfbeb14032 (patch) | |
tree | 53ffd4ab4d99f7ff37dfa31407c2199a222baf5c /strings/my_vsnprintf.c | |
parent | ed7e4b68ed59fb7c34dc06625dfe378e71d1e8a7 (diff) | |
download | mariadb-git-2cd316911309e3db4007aa224f7874bfbeb14032.tar.gz |
MDEV-14265 - RPMLint warning: shared-lib-calls-exit
find_type_or_exit() client helper did exit(1) on error, exit(1) moved to
clients.
mysql_read_default_options() did exit(1) on error, error is passed through and
handled now.
my_str_malloc_default() did exit(1) on error, replaced my_str_ allocator
functions with normal my_malloc()/my_realloc()/my_free().
sql_connect.cc did many exit(1) on hash initialisation failure. Removed error
check since my_hash_init() never fails.
my_malloc() did exit(1) on error. Replaced with abort().
my_load_defaults() did exit(1) on error, replaced with return 2.
my_load_defaults() still does exit(0) when invoked with --print-defaults.
Diffstat (limited to 'strings/my_vsnprintf.c')
-rw-r--r-- | strings/my_vsnprintf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c index 4178b20789d..134fdfc57b8 100644 --- a/strings/my_vsnprintf.c +++ b/strings/my_vsnprintf.c @@ -755,14 +755,14 @@ int my_vfprintf(FILE *stream, const char* format, va_list args) and try again. */ if (alloc) - (*my_str_free)(p); + my_free(p); else alloc= 1; new_len= cur_len*2; if (new_len < cur_len) return 0; /* Overflow */ cur_len= new_len; - p= (*my_str_malloc)(cur_len); + p= my_malloc(cur_len, MYF(MY_FAE)); if (!p) return 0; } @@ -770,7 +770,7 @@ int my_vfprintf(FILE *stream, const char* format, va_list args) if (fputs(p, stream) < 0) ret= -1; if (alloc) - (*my_str_free)(p); + my_free(p); return ret; } |