
Dear Ben Warren,
In message 4A8C5288.5020308@gmail.com you wrote:
- /* Wait up to 5s for the link status */
- for (i = 0; i < 5; i++) {
u16 phyadr;
Please put this variable declaration outside of the 'for' loop
Why? If it's only used in this block it's actually a good thing to restrict it to this scope.
It seems your coding standards have changed, which everybody knows is impossible. Where's you put the old Wolfgang, doppleganger? :)
Oops? I think you must be wrong. I have always been a friend of declaring variables such that they have minimal scope. Back in the old days when I started to learn C this helped to keep the stack size low.
Did I really ever say anything against such practice?
I'm always fighting against variable declarations mixed in the middle of code, of course, but this here is done right: at the begin of a new block.
Best regards,
Wolfgang Denk