From 03022b7924c6ddeadaa056c0f2a1b2930bbf490d Mon Sep 17 00:00:00 2001 From: Robert Spalek Date: Wed, 26 Sep 2001 16:13:34 +0000 Subject: [PATCH] die() called with string containing newlines replaced by fputs(stderr) and exit() --- lib/bucket.c | 5 ++++- lib/sort-test.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/bucket.c b/lib/bucket.c index 38d552e0..626c87ac 100644 --- a/lib/bucket.c +++ b/lib/bucket.c @@ -428,7 +428,10 @@ int main(int argc, char **argv) log_init(NULL); if (cf_getopt(argc, argv, CF_SHORT_OPTS, CF_NO_LONG_OPTS, NULL) >= 0 || optind < argc) - die("This program supports only the following command-line arguments:\n" CF_USAGE); + { + fputs("This program supports only the following command-line arguments:\n" CF_USAGE, stderr); + exit(1); + } unlink(obuck_name); obuck_init(1); diff --git a/lib/sort-test.c b/lib/sort-test.c index 9d322777..448abdc3 100644 --- a/lib/sort-test.c +++ b/lib/sort-test.c @@ -79,7 +79,10 @@ main(int argc, char **argv) log_init(NULL); if (cf_getopt(argc, argv, CF_SHORT_OPTS, CF_NO_LONG_OPTS, NULL) >= 0 || optind != argc - 2) - die("Usage: sort-test [] \nOptions:\n" CF_USAGE); + { + fputs("This program supports only the following command-line arguments:\n" CF_USAGE, stderr); + exit(1); + } s_sort(argv[optind], argv[optind+1]); return 0; -- 2.39.2