summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2014-03-11 19:18:19 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2014-03-11 19:18:19 +0100
commite2a4d351426433723d25c87ee6cc15b2a0b1c799 (patch)
tree3da65e824c6d7a2c660f1e41a6dd1112140e0608
parent1e463810f62525e9c56afb203ca78448a01c8547 (diff)
downloadextrace-e2a4d351426433723d25c87ee6cc15b2a0b1c799.tar.gz
extrace-e2a4d351426433723d25c87ee6cc15b2a0b1c799.tar.xz
extrace-e2a4d351426433723d25c87ee6cc15b2a0b1c799.zip
make -o imply -w
-rw-r--r--extrace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/extrace.c b/extrace.c
index 969c376..b799239 100644
--- a/extrace.c
+++ b/extrace.c
@@ -7,7 +7,7 @@
  * default: show all exec(), globally
  * -p PID   only show exec() descendant of PID
  * CMD...   run CMD... and only show exec() descendant of it
- * -o FILE  log to FILE instead of standard output
+ * -o FILE  log to FILE instead of standard output (implies -w)
  * -w       wide output: show full command line
  * -f       flat output: no indentation
  *
@@ -181,7 +181,7 @@ main(int argc, char *argv[])
 
   if (getenv("COLUMNS"))
     width = atoi(getenv("COLUMNS"));
-  if (width == 0)
+  if (width <= 0)
     width = 80;
 
   output = stdout;
@@ -196,7 +196,7 @@ main(int argc, char *argv[])
         perror("fopen");
         exit(1);
       }
-      break;
+      /* FALLTROUGH */
     case 'w': width = CMDLINE_MAX; break;
     default: goto usage;
     }