]> diplodocus.org Git - nmh/blobdiff - sbr/read_yes_or_no_if_tty.c
new.c: Order two return statements to match comment.
[nmh] / sbr / read_yes_or_no_if_tty.c
index 3d7c110427a1efbaea905202c8724f7d11c1d155..93484e4ecfbb04874b4820101d30cd2b740bf89d 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * read_yes_or_no_if_tty.c -- get a yes/no answer from the user
+/* read_yes_or_no_if_tty.c -- get a yes/no answer from the user
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -15,7 +14,7 @@ read_yes_or_no_if_tty (const char *prompt)
     static int interactive = -1;
 
     if (interactive < 0)
     static int interactive = -1;
 
     if (interactive < 0)
-       interactive = isatty (fileno (stdin)) ? 1 : 0;
+        interactive = isatty (fileno (stdin));
 
 
-    return (interactive ? read_switch (prompt, anoyes) : 1);
+    return interactive ? read_switch(prompt, anoyes) : 1;
 }
 }