Putting the globals into a controlled struct make them easier to reason about, both for humans and for source code analysis. And even if the resulting struct is little more than the "globals dumping ground", it does force that they all be declared in one single place, in a place where you have to admit "this is a global".
On Wed, Feb 21, 2018 at 10:58 AM Hal Murray via devel <devel@ntpsec.org> wrote: > > > I've been looking at the code around mode 6 generation and discovered > that > > in some areas it's still globals all the way down. Translating these > > globals will make future refactoring/translating easier. > > I'm missing the big idea. > > The current case is that we have a lot of global variables. > > What does packaging them in a struct solve? We aren't going to pass a > pointer to the struct around all over the place. > > Should we cleanup the names so it's obvious which variables are global? > Should we reorganize the header files so it's easier to find all of them? > > > -- > These are my opinions. I hate spam. > > > > _______________________________________________ > devel mailing list > devel@ntpsec.org > http://lists.ntpsec.org/mailman/listinfo/devel > -- Mark Atwood http://about.me/markatwood +1-206-604-2198
_______________________________________________ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel