From 98d7d491a6002197d6674c86e8ecaf758e34d649 Mon Sep 17 00:00:00 2001 From: Joseph Langford Date: Sat, 22 Oct 2022 15:01:41 -0400 Subject: [PATCH] Added ternary operator --- UARTfuzz.ino | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/UARTfuzz.ino b/UARTfuzz.ino index 3537b43..0a70932 100644 --- a/UARTfuzz.ino +++ b/UARTfuzz.ino @@ -70,9 +70,8 @@ int reportAndAsk(int i) { char fuzz = Serial.read(); Serial.print("[+] "); Serial.println(fuzz); - //todo ternary operator - if (fuzz == 'y') return 1; - return 0; + fuzz == 'y' ? 1 : 0; + } //read bytes and present them to the user