diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-12-03 17:38:50 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-12-03 17:38:50 +0100 |
commit | 0df54921bc3567db80eb894b01b2b5a6ea3d7c02 (patch) | |
tree | 4dfab39e6b24c36ea58487ff511b978b85c3a944 /src | |
parent | 02e062262f39a3002c1242954d4b04a5061d69bf (diff) | |
download | systemd-0df54921bc3567db80eb894b01b2b5a6ea3d7c02.tar.gz |
tree-wide: use new macro HAS_FEATURE_ADDRESS_SANITIZER everywhere
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/lookup3.c | 6 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/test-bus-marshal.c | 2 | ||||
-rw-r--r-- | src/test/test-capability.c | 2 | ||||
-rw-r--r-- | src/test/test-execute.c | 2 | ||||
-rw-r--r-- | src/test/test-sigbus.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/journal/lookup3.c b/src/journal/lookup3.c index ff194dd951..6c61f17c7d 100644 --- a/src/journal/lookup3.c +++ b/src/journal/lookup3.c @@ -319,7 +319,7 @@ uint32_t jenkins_hashlittle( const void *key, size_t length, uint32_t initval) * still catch it and complain. The masking trick does make the hash * noticeably faster for short strings (like English words). */ -#if !VALGRIND && !defined(__SANITIZE_ADDRESS__) +#if !VALGRIND && !HAS_FEATURE_ADDRESS_SANITIZER switch(length) { @@ -504,7 +504,7 @@ void jenkins_hashlittle2( * still catch it and complain. The masking trick does make the hash * noticeably faster for short strings (like English words). */ -#if !VALGRIND && !defined(__SANITIZE_ADDRESS__) +#if !VALGRIND && !HAS_FEATURE_ADDRESS_SANITIZER switch(length) { @@ -680,7 +680,7 @@ uint32_t jenkins_hashbig( const void *key, size_t length, uint32_t initval) * still catch it and complain. The masking trick does make the hash * noticeably faster for short strings (like English words). */ -#if !VALGRIND && !defined(__SANITIZE_ADDRESS__) +#if !VALGRIND && !HAS_FEATURE_ADDRESS_SANITIZER switch(length) { diff --git a/src/libsystemd/sd-bus/test-bus-marshal.c b/src/libsystemd/sd-bus/test-bus-marshal.c index d1c674b223..1e9810ce4f 100644 --- a/src/libsystemd/sd-bus/test-bus-marshal.c +++ b/src/libsystemd/sd-bus/test-bus-marshal.c @@ -202,7 +202,7 @@ int main(int argc, char *argv[]) { log_info("message size = %zu, contents =\n%s", sz, h); #if HAVE_GLIB -#ifndef __SANITIZE_ADDRESS__ +#if !HAS_FEATURE_ADDRESS_SANITIZER { GDBusMessage *g; char *p; diff --git a/src/test/test-capability.c b/src/test/test-capability.c index 5bfcc385d9..dae85f2f91 100644 --- a/src/test/test-capability.c +++ b/src/test/test-capability.c @@ -20,7 +20,7 @@ static uid_t test_uid = -1; static gid_t test_gid = -1; -#ifdef __SANITIZE_ADDRESS__ +#if HAS_FEATURE_ADDRESS_SANITIZER /* Keep CAP_SYS_PTRACE when running under Address Sanitizer */ static const uint64_t test_flags = UINT64_C(1) << CAP_SYS_PTRACE; #else diff --git a/src/test/test-execute.c b/src/test/test-execute.c index fdde079cef..2115061add 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -759,7 +759,7 @@ int main(int argc, char *argv[]) { test_setup_logging(LOG_DEBUG); -#ifdef __SANITIZE_ADDRESS__ +#if HAS_FEATURE_ADDRESS_SANITIZER if (is_run_on_travis_ci()) { log_notice("Running on TravisCI under ASan, skipping, see https://github.com/systemd/systemd/issues/10696"); return EXIT_TEST_SKIP; diff --git a/src/test/test-sigbus.c b/src/test/test-sigbus.c index 33c9d42e9e..d2666dd1d8 100644 --- a/src/test/test-sigbus.c +++ b/src/test/test-sigbus.c @@ -19,7 +19,7 @@ int main(int argc, char *argv[]) { test_setup_logging(LOG_INFO); -#ifdef __SANITIZE_ADDRESS__ +#if HAS_FEATURE_ADDRESS_SANITIZER return log_tests_skipped("address-sanitizer is enabled"); #endif #if HAVE_VALGRIND_VALGRIND_H |