summaryrefslogtreecommitdiff
path: root/common/board_f.c
diff options
context:
space:
mode:
authorEugeniu Rosca <erosca@de.adit-jv.com>2019-04-01 12:45:33 +0200
committerSimon Glass <sjg@chromium.org>2019-04-23 20:26:43 -0600
commitd9313efc2e61e8f827ed30c5a911a20c1f43df7c (patch)
tree688676cd0ad418cf17e98b717c8e2ec31c954be4 /common/board_f.c
parent6c5f8dd540d7a8eff244d4c27a09451ca12c8d20 (diff)
fdt: boot_get_fdt: remove redundant zeroing out
Paranoid programming [1] lies at the foundation of proper software development, but the repetitive zeroing-out of output arguments in the context of the same function rather clutters the code and inhibits further refactoring/optimization than is doing any good. In boot_get_fdt(), we already perform zero/NULL-initialization of *of_flat_tree and *of_size at the beginning of the function, so doing the same at function error-out is redundant/superfluous. Moreover, keeping the code unchanged might encourage the developers to update *of_flat_tree and *of_size during some interim computations, which is against the current design of boot_get_fdt(). Currently, writing useful data into these arguments happens just before successfully returning from boot_get_fdt() and it should better stay so. [1] https://blog.regehr.org/archives/1106 Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/board_f.c')
0 files changed, 0 insertions, 0 deletions