diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-12-22 12:23:39 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-12-22 12:23:39 +0200 |
commit | 985d2d393c285ecd4539cb579b680f7b91fdaa1a (patch) | |
tree | 8cabf6c09758c30df04de96ca98c7827d5665493 /mysys | |
parent | a76a2522ec4f8c069827e038997387a8b8eb3a3a (diff) | |
parent | 461cf3e5a3c2d346d75b1407b285f8daf9d01f67 (diff) | |
download | mariadb-git-985d2d393c285ecd4539cb579b680f7b91fdaa1a.tar.gz |
Merge remote-tracking branch 'origin/10.1' into 10.2
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_default.c | 6 | ||||
-rw-r--r-- | mysys/my_malloc.c | 2 | ||||
-rw-r--r-- | mysys/typelib.c | 12 |
3 files changed, 3 insertions, 17 deletions
diff --git a/mysys/my_default.c b/mysys/my_default.c index 37f6d2bfbbf..1c8e976d8dc 100644 --- a/mysys/my_default.c +++ b/mysys/my_default.c @@ -487,8 +487,7 @@ int load_defaults(const char *conf_file, const char **groups, easily command line options override options in configuration files NOTES - In case of fatal error, the function will print a warning and do - exit(1) + In case of fatal error, the function will print a warning and returns 2 To free used memory one should call free_defaults() with the argument that was put in *argv @@ -641,8 +640,7 @@ int my_load_defaults(const char *conf_file, const char **groups, err: fprintf(stderr,"Fatal error in defaults handling. Program aborted\n"); - exit(1); - return 0; /* Keep compiler happy */ + return 2; } diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c index dc02d3896bd..719c13a040e 100644 --- a/mysys/my_malloc.c +++ b/mysys/my_malloc.c @@ -109,7 +109,7 @@ void *my_malloc(size_t size, myf my_flags) my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_WAITTANG + ME_NOREFRESH + ME_FATALERROR),size); if (my_flags & MY_FAE) - exit(1); + abort(); } else { diff --git a/mysys/typelib.c b/mysys/typelib.c index e45ede2c43a..f0be211fd46 100644 --- a/mysys/typelib.c +++ b/mysys/typelib.c @@ -45,18 +45,6 @@ int find_type_with_warning(const char *x, TYPELIB *typelib, const char *option) } -int find_type_or_exit(const char *x, TYPELIB *typelib, const char *option) -{ - int res; - if ((res= find_type_with_warning(x, typelib, option)) <= 0) - { - sf_leaking_memory= 1; /* no memory leak reports here */ - exit(1); - } - return res; -} - - /** Search after a string in a list of strings. Endspace in x is not compared. |