Fix platform check for `-A` CoreSight mode
Signed-off-by: Akira Moroo <retrage01@gmail.com>
diff --git a/src/afl-analyze.c b/src/afl-analyze.c
index 6e1a9e7..bc562c1 100644
--- a/src/afl-analyze.c
+++ b/src/afl-analyze.c
@@ -995,14 +995,12 @@
case 'A': /* CoreSight mode */
+#if !defined(__aarch64__) || !defined(__linux__)
+ FATAL("-A option is not supported on this platform");
+#endif
+
if (cs_mode) { FATAL("Multiple -A options not supported"); }
- if (!(__aarch64__ && __linux__)) {
-
- FATAL("-A option is not supported on this platform");
-
- }
-
cs_mode = 1;
fsrv.cs_mode = cs_mode;
break;
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index e6d9508..44363c2 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -829,14 +829,12 @@
case 'A': /* CoreSight mode */
+ #if !defined(__aarch64__) || !defined(__linux__)
+ FATAL("-A option is not supported on this platform");
+ #endif
+
if (afl->fsrv.cs_mode) { FATAL("Multiple -A options not supported"); }
- if (!(__aarch64__ && __linux__)) {
-
- FATAL("-A option is not supported on this platform");
-
- }
-
afl->fsrv.cs_mode = 1;
break;
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index 0e7d9df..899baaa 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -1067,14 +1067,12 @@
* undocumenetd feature "Another afl-cmin specific feature." */
case 'P': /* CoreSight mode */
+#if !defined(__aarch64__) || !defined(__linux__)
+ FATAL("-P option is not supported on this platform");
+#endif
+
if (fsrv->cs_mode) { FATAL("Multiple -P options not supported"); }
- if (!(__aarch64__ && __linux__)) {
-
- FATAL("-P option is not supported on this platform");
-
- }
-
fsrv->cs_mode = true;
break;
diff --git a/src/afl-tmin.c b/src/afl-tmin.c
index 110beed..22383a4 100644
--- a/src/afl-tmin.c
+++ b/src/afl-tmin.c
@@ -1038,14 +1038,12 @@
case 'A': /* CoreSight mode */
+#if !defined(__aarch64__) || !defined(__linux__)
+ FATAL("-A option is not supported on this platform");
+#endif
+
if (fsrv->cs_mode) { FATAL("Multiple -A options not supported"); }
- if (!(__aarch64__ && __linux__)) {
-
- FATAL("-A option is not supported on this platform");
-
- }
-
fsrv->cs_mode = 1;
break;