
30 Apr
2011
30 Apr
'11
12:51 a.m.
Dear Tabi Timur-B04825,
In message 4DBB3E01.7000704@freescale.com you wrote:
Wolfgang Denk wrote:
Why do we need this "if" at all? tolower() on a digit is a nop, so you can omit the first branch.
Because cpu->name looks like one of two ways:
8578
or
P4080
In the case of "8578", we want to convert that to "mpc8578". In the case o f "P4080", we want to convert that to "p4080".
The "if" is need to determine whether to prepend the "mpc".
This gets lost in the code.
If you keep the if / else, you have to add braces for the multiline statements.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Always try to do things in chronological order; it's less confusing
that way.