From: Li Wang Date: Sat, 30 Sep 2017 02:32:07 +0000 (+0000) Subject: common: assert(false)->ceph_abort() X-Git-Tag: v13.0.1~675^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e482d2ea7089353bc2f2ff8a6a1add22b939088a;p=ceph.git common: assert(false)->ceph_abort() Signed-off-by: Li Wang --- diff --git a/src/common/config.cc b/src/common/config.cc index 3cbb27e3484c..564039b9c81e 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -87,7 +87,7 @@ md_config_t::md_config_t(bool is_daemon) // We may be instantiated pre-logging so send std::cerr << "Duplicate config key in schema: '" << i.name << "'" << std::endl; - assert(false); + ceph_abort(); } schema.insert({i.name, i}); } @@ -131,7 +131,7 @@ md_config_t::md_config_t(bool is_daemon) // This is the compiled-in default that is failing its own option's // validation, so this is super-invalid and should never make it // past a pull request: crash out. - assert(false); + ceph_abort(); } } @@ -160,7 +160,7 @@ void md_config_t::validate_schema() if (schema.count(see_also_key) == 0) { std::cerr << "Non-existent see-also key '" << see_also_key << "' on option '" << opt.name << "'" << std::endl; - assert(false); + ceph_abort(); } } } @@ -169,7 +169,7 @@ void md_config_t::validate_schema() if (schema.count(i.first) == 0) { std::cerr << "Schema is missing legacy field '" << i.first << "'" << std::endl; - assert(false); + ceph_abort(); } } } diff --git a/src/common/lockdep.cc b/src/common/lockdep.cc index d7a165ff9cf1..0ca8f777cc5a 100644 --- a/src/common/lockdep.cc +++ b/src/common/lockdep.cc @@ -180,7 +180,7 @@ static int _lockdep_register(const char *name) for (auto& p : lock_names) { lockdep_dout(0) << " lock " << p.first << " " << p.second << dendl; } - assert(false); + ceph_abort(); } if (current_maxid <= (unsigned)id) { current_maxid = (unsigned)id + 1;