:: commit 2652f27730b55fdc56bbc672276f9f25e787f299

Kamila Szewczyk <kspalaiologos@gmail.com> — 2022-05-16 08:39

parents: 09b6051a51

fallback case

diff --git a/src/main.c b/src/main.c
index f2dc921..904b09a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -187,7 +187,7 @@ int main(int argc, char * argv[]) {
 
     if (input == NULL && output == NULL) force_stdstreams = 1;
 
-    FILE *input_des, *output_des;
+    FILE *input_des = NULL, *output_des = NULL;
 
     if (input != NULL) {
         if (is_dir(input)) {
@@ -200,7 +200,7 @@ int main(int argc, char * argv[]) {
             perror("fopen");
             return 1;
         }
-    } else if (force_stdstreams) {
+    } else {
         input_des = stdin;
     }
 
@@ -215,7 +215,7 @@ int main(int argc, char * argv[]) {
             perror("open");
             return 1;
         }
-    } else if (force_stdstreams) {
+    } else {
         output_des = stdout;
     }
 
tab: 248 wrap: offon