when you try to run iostat is fails with invalid dk_ndrive 0
Reviewed by: phk Submitted by: John-Mark Gurney <jmg@nike.efn.org>
This commit is contained in:
parent
46a414ffbb
commit
d469fb7bda
@ -184,7 +184,7 @@ main(argc, argv)
|
||||
if (namelist[X_DK_NDRIVE].n_type == 0)
|
||||
errx(1, "dk_ndrive not found in namelist");
|
||||
(void)nlread(X_DK_NDRIVE, dk_ndrive);
|
||||
if (dk_ndrive <= 0)
|
||||
if (dk_ndrive < 0)
|
||||
errx(1, "invalid dk_ndrive %d\n", dk_ndrive);
|
||||
|
||||
cur.dk_time = calloc(dk_ndrive, sizeof(long));
|
||||
|
Loading…
Reference in New Issue
Block a user