diff options
author | phk <phk@FreeBSD.org> | 2003-08-18 11:13:19 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-08-18 11:13:19 +0000 |
commit | 9a9a510c2c85c77f33dfc15ee93e867ca587a42d (patch) | |
tree | 02786b2abbbc8c969ba7fd847c37a98a46ac8a61 /usr.bin | |
parent | 49037ec1b200d71eb93decf5b78b2d3449224487 (diff) | |
download | FreeBSD-src-9a9a510c2c85c77f33dfc15ee93e867ca587a42d.zip FreeBSD-src-9a9a510c2c85c77f33dfc15ee93e867ca587a42d.tar.gz |
In case of zero span data supress the histogram plot.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ministat/ministat.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.bin/ministat/ministat.c b/usr.bin/ministat/ministat.c index 4b7c6a0..b8ca72a 100644 --- a/usr.bin/ministat/ministat.c +++ b/usr.bin/ministat/ministat.c @@ -328,6 +328,8 @@ PlotSet(struct dataset *ds, int val) int i, j, m, x; pl = &plot; + if (pl->span == 0) + return; m = 1; i = -1; j = 0; @@ -380,6 +382,10 @@ DumpPlot(void) int i, j, k; pl = &plot; + if (pl->span == 0) { + printf("[no plot, span is zero width]\n"); + return; + } putchar('+'); for (i = 0; i < pl->width; i++) |