aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-09-14 15:31:01 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-09-14 15:31:01 +0000
commitf57cc5da1bceb61004225067c5c2111b96ebfdd7 (patch)
treee620c0a61f76a7c1fa52fadcce351bded118d8cd /src/main.c
parentbd121a0e0440e7182d04eb22f099c96637f212ca (diff)
downloadcflow-f57cc5da1bceb61004225067c5c2111b96ebfdd7.tar.gz
cflow-f57cc5da1bceb61004225067c5c2111b96ebfdd7.tar.bz2
(main): Fixed coredump when no arguments were passed.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 11cec84..296a62d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -669,10 +669,11 @@ main(int argc, char **argv)
- /* See comment to cleanup_processor */
- for (arglist = CAR(arglist); arglist; arglist = CDR(arglist)) {
- char *s = (char*)CAR(arglist);
- if (s[0] == '-')
- pp_option(s);
- else if (source(s) == 0)
- yyparse();
- }
+ if (arglist)
+ /* See comment to cleanup_processor */
+ for (arglist = CAR(arglist); arglist; arglist = CDR(arglist)) {
+ char *s = (char*)CAR(arglist);
+ if (s[0] == '-')
+ pp_option(s);
+ else if (source(s) == 0)
+ yyparse();
+ }

Return to:

Send suggestions and report system problems to the System administrator.