From: Robert Spalek Date: Wed, 26 Sep 2001 16:13:34 +0000 (+0000) Subject: die() called with string containing newlines replaced by fputs(stderr) and exit() X-Git-Tag: holmes-import~1470 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=03022b7924c6ddeadaa056c0f2a1b2930bbf490d;p=libucw.git die() called with string containing newlines replaced by fputs(stderr) and exit() --- 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;