From b0ef09bc0901911c247f40b8972b505dca94f593 Mon Sep 17 00:00:00 2001 From: oetiker Date: Tue, 9 May 2006 18:46:14 +0000 Subject: [PATCH] don't panic if the user forgets to specify the name of the rrd file git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@823 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_create.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rrd_create.c b/src/rrd_create.c index 5eac360..46006ea 100644 --- a/src/rrd_create.c +++ b/src/rrd_create.c @@ -78,7 +78,10 @@ rrd_create(int argc, char **argv) return(-1); } } - + if (optind == argc) { + rrd_set_error("what is the name of the rrd file you want to create?"); + return -1; + } rc = rrd_create_r(argv[optind], pdp_step, last_up, argc - optind - 1, argv + optind + 1); -- 2.11.0