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/ctype-tis620.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/ctype-tis620.c')
-rw-r--r-- | strings/ctype-tis620.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index bd8efeff1ec..5284109b816 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -524,7 +524,7 @@ int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)), tc1= buf; if ((len1 + len2 +2) > (int) sizeof(buf)) - tc1= (uchar*) my_str_malloc(len1+len2+2); + tc1= (uchar*) my_malloc(len1+len2+2, MYF(MY_FAE)); tc2= tc1 + len1+1; memcpy((char*) tc1, (char*) s1, len1); tc1[len1]= 0; /* if length(s1)> len1, need to put 'end of string' */ @@ -534,7 +534,7 @@ int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)), thai2sortable(tc2, len2); i= strcmp((char*)tc1, (char*)tc2); if (tc1 != buf) - my_str_free(tc1); + my_free(tc1); return i; } @@ -555,7 +555,7 @@ int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)), a= buf; if ((a_length + b_length +2) > (int) sizeof(buf)) - alloced= a= (uchar*) my_str_malloc(a_length+b_length+2); + alloced= a= (uchar*) my_malloc(a_length+b_length+2, MYF(MY_FAE)); b= a + a_length+1; memcpy((char*) a, (char*) a0, a_length); @@ -604,7 +604,7 @@ int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)), ret: if (alloced) - my_str_free(alloced); + my_free(alloced); return res; } |