diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-03-19 17:20:15 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-03-19 17:20:15 -0300 |
commit | 27e3214b494b0cec3bdb5de927d18bc04323f6fb (patch) | |
tree | e8bb057569592ba9675e0119dbc1c707f56fc8d8 /mysys | |
parent | e8c13e6a5482947d4d41a60826460dd76bcce975 (diff) | |
download | mariadb-git-27e3214b494b0cec3bdb5de927d18bc04323f6fb.tar.gz |
Bug#43461: invalid comparison with string literal in default.c
Don't compare string literals as it results in unspecified behavior.
mysys/default.c:
Test for a empty string.
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/default.c | 2 | ||||
-rw-r--r-- | mysys/my_new.cc | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/mysys/default.c b/mysys/default.c index 0067e95ffbe..362aa0d4605 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -1083,7 +1083,7 @@ static const char **init_default_directories(MEM_ROOT *alloc) if ((env= getenv("ETC"))) errors += add_directory(alloc, env, dirs); #elif defined(DEFAULT_SYSCONFDIR) - if (DEFAULT_SYSCONFDIR != "") + if (DEFAULT_SYSCONFDIR[0]) errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs); #endif /* __EMX__ || __OS2__ */ diff --git a/mysys/my_new.cc b/mysys/my_new.cc index babfe04d695..7da54ffac87 100644 --- a/mysys/my_new.cc +++ b/mysys/my_new.cc @@ -46,8 +46,9 @@ void operator delete[] (void *ptr) throw () C_MODE_START -int __cxa_pure_virtual() { - assert("Pure virtual method called." == "Aborted"); +int __cxa_pure_virtual() +{ + assert(! "Aborted: pure virtual method called."); return 0; } |