From 110084953e6113002957304047144bf555847970 Mon Sep 17 00:00:00 2001 From: kevinnls <57634663+kevinnls@users.noreply.github.com> Date: Mon, 20 Sep 2021 02:23:38 +0530 Subject: [PATCH] simplify --- bubblesort/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bubblesort/main.c b/bubblesort/main.c index 3c2c057..6613109 100644 --- a/bubblesort/main.c +++ b/bubblesort/main.c @@ -8,9 +8,9 @@ int DEBUG; int main(){ char* _debug = getenv("DEBUG"); - if(_debug){ - DEBUG = strcmp(_debug,"1") == 0 ? 1 : 0; - } + if(_debug) + DEBUG = !strcmp(_debug,"1"); + //how does this even work??? int arr[] = {1,2,4,593,29,19,0}; int arr_len = sizeof(arr) / sizeof(arr[0]);