commit 6779718f252ecadf0c78ed33806638299466e9d1
parent 5c6ae89e707b5a1f5685714895b962f4269975ec
Author: Paco Esteban <paco@e1e0.net>
Date: Tue, 30 Jun 2020 12:25:22 +0200
remove useless char *
Diffstat:
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/ssnail.c b/ssnail.c
@@ -82,7 +82,6 @@ main(int argc, char *argv[])
const struct ssnail_error *error = NULL;
int ch, force = 0;
- char *srcdir = NULL, *dstdir = NULL;
char *header_tpl = NULL, *footer_tpl = NULL;
header_tpl = strdup(HEADER);
@@ -129,18 +128,7 @@ main(int argc, char *argv[])
if (argc < 2)
usage();
- srcdir = strdup(argv[0]);
- if (srcdir == NULL) {
- error = ssnail_error_from_errno("srcdir arg");
- goto done;
- }
- dstdir = strdup(argv[1]);
- if (dstdir == NULL) {
- error = ssnail_error_from_errno("dstdir arg");
- goto done;
- }
-
- if ((error = process_dir(srcdir, dstdir, force)) != NULL)
+ if ((error = process_dir(argv[0], argv[1], force)) != NULL)
goto done;
if ((error = article_sort(&head)) != NULL)
@@ -157,8 +145,6 @@ main(int argc, char *argv[])
}
done:
- free(srcdir);
- free(dstdir);
free(header_tpl);
free(footer_tpl);
articleq_free(&head);