
Hi, Wolfgang,
2011/1/20 Wolfgang Denk wd@denx.de:
Dear Jason Liu,
In message AANLkTinx920ets6A-F5R-+RiJ06OQLx=5zUjbj9LK7wX@mail.gmail.com you wrote:
Do you mean the I need add the braces as the following?
if ((fhdr_v1->app_code_barker == APP_CODE_BARKER) && (hdr_v1->dcd_table.preamble.barker == DCD_BARKER)) { return IMXIMAGE_V1; }
Right. And especially with the blank lines you had before.
Yes, but can we just change to the following since it just one statement, if ((fhdr_v1->app_code_barker == APP_CODE_BARKER) && (hdr_v1->dcd_table.preamble.barker == DCD_BARKER)) return IMXIMAGE_V1;
Some checkpatch will give a warning, say, no need to add braces for only one statement, something like that.
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 Winners never talk about glorious victories. That's because they're the ones who see what the battlefield looks like afterwards. It's only the losers who have glorious victories. - Terry Pratchett, _Small Gods_