aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-10-07 19:57:25 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-10-07 19:57:25 -0300
commitb54d7c65021d7d65c6a2b0088a6c3591e10ccfb3 (patch)
treed7e0a90501df18458c999cdeace1b963125e9a60 /src/main.c
parent1769387fb663d215871a901356dcd484c9587e58 (diff)
downloadblogc-b54d7c65021d7d65c6a2b0088a6c3591e10ccfb3.tar.gz
blogc-b54d7c65021d7d65c6a2b0088a6c3591e10ccfb3.tar.bz2
blogc-b54d7c65021d7d65c6a2b0088a6c3591e10ccfb3.zip
renderer: accept empty list of files with -l
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 06b8714..616641f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -195,12 +195,9 @@ main(int argc, char **argv)
sources = b_slist_append(sources, b_strdup(argv[i]));
}
- if (b_slist_length(sources) == 0) {
+ if (!listing && b_slist_length(sources) == 0) {
blogc_print_usage();
- if (listing)
- fprintf(stderr, "blogc: error: at least one source file is required\n");
- else
- fprintf(stderr, "blogc: error: one source file is required\n");
+ fprintf(stderr, "blogc: error: one source file is required\n");
rv = 2;
goto cleanup;
}