Date: Sat, 22 Sep 2018 22:03:56 +0200
From: Kamil Rytarowski <[email protected]>
Message-ID: <[email protected]>
| I know, but in this case the symbol name (preprocessor symbol) was
| available in other functions in the same file. I've decided that it will
| be simpler to just change 1 line of code.
I don't think you understood the point, Christos wasn't suggesting (I don't
think) that you do away with s_max, but rather that the code become
more like...
#define S_MAX 3
const int s_max = S_MAX, ss_max = 3, eu_max = 8;
int s, ss;
u32 fuse2, eu_disable[S_MAX], s_enable, ss_disable;
as, as it is now ...
const int s_max = 3, ss_max = 3, eu_max = 8;
int s, ss;
u32 fuse2, eu_disable[3], s_enable, ss_disable;
it is no longer obvious which of s_max and ss_max (both of which
are 3), if either, is intended to be the same as the array size of eu_disable
(which was obvious in the original, where the dimension of eu_disable
was s_max).
If s_max and ss_max are both intended to always be the same (in which
case I would wonder why they both exist) then making ss_max = S_MAX
in the declaration would be appropriate as well.
kre