Avoid negative array indices: an empty string can also be used

to specify a default value.
This commit is contained in:
dds 2006-11-06 11:03:43 +00:00
parent dc4421d112
commit 571eb96dc6
2 changed files with 3 additions and 2 deletions

View File

@ -106,7 +106,8 @@ and the step size or, for random data, the seed.
While at least one of them must appear,
any of the other three may be omitted, and
will be considered as such if given as
.Fl "" .
.Fl ""
or as an empty string.
Any three of these arguments determines the fourth.
If four are specified and the given and computed values of
.Ar reps

View File

@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$");
#define HAVE_BEGIN 4
#define HAVE_REPS 8
#define is_default(s) (strcmp((s), "-") == 0)
#define is_default(s) (*(s) == 0 || strcmp((s), "-") == 0)
double begin;
double ender;