maria-developers team mailing list archive
Mailing list archive
Re: 665402a: MDEV-14265 - RPMLint warning: shared-lib-calls-exit
On Dec 18, Sergey Vojtovich wrote:
> revision-id: 665402aa9b83565c1cef3caa06cd998d3808f0d7 (mariadb-10.1.29-31-g665402a)
> parent(s): ef9e78c9d41a5ac644f08068e3dabad948b0e30a
> committer: Sergey Vojtovich
> timestamp: 2017-12-18 20:23:36 +0400
> MDEV-14265 - RPMLint warning: shared-lib-calls-exit
> find_type_with_warning() client helper did exit(1) on error, exit(1) moved to
It was find_type_or_exit(), and you could've had less changes if you'd
replaced it with an inline function. Basically, copied the function into
the header and made it static inline.
> 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().
I think you need to replace my_str_malloc_default() with
my_malloc(..., MYF(MY_FAE)), not my_malloc(..., MYF(0))
> 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 abort().
I'd say, return 2 instead of exit/abort. my_load_defaults already does
it, because my_search_option_files returns 2 for OOM.
> my_load_defaults() still does exit(0) when invoked with --print-defaults.
dunno, return -1, for example, and exit in the caller?
Chief Architect MariaDB