Page MenuHomeFreeBSD

ministat: Simplify DumpPlot
Needs ReviewPublic

Authored by 0mp on Wed, Nov 12, 3:12 PM.
Tags
None
Referenced Files
F137752460: D53711.diff
Tue, Nov 25, 12:19 PM
Unknown Object (File)
Sat, Nov 22, 6:09 PM
Unknown Object (File)
Fri, Nov 21, 5:01 AM
Unknown Object (File)
Fri, Nov 21, 4:52 AM
Unknown Object (File)
Fri, Nov 21, 4:49 AM
Unknown Object (File)
Sun, Nov 16, 10:19 AM
Unknown Object (File)
Sat, Nov 15, 10:18 AM
Unknown Object (File)
Sat, Nov 15, 10:18 AM
Subscribers

Details

Summary

There is no need to handle 0<=k<MAX_DS, as k is always like that in this
code path.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 68574
Build 65457: arc lint + arc unit

Event Timeline

0mp requested review of this revision.Wed, Nov 12, 3:12 PM

There is no need to handle 0<=k<MAX_DS, as k is always like that in this code path.

How do you know that?

usr.bin/ministat/ministat.c
635

@markj, during command-line argument parsing the program refuses to operate on more datasets than MAX_DS.

Ok, so PlotSet() sets pl->data[j * pl->width + x] |= val where 0<=val<MAX_DS. So your assertion is true, but only because MAX_DS is a power of 2.

I don't really see the value of the change to be honest.