diff options
author | Felix Singer <felixsinger@posteo.net> | 2022-11-26 05:06:58 +0100 |
---|---|---|
committer | Felix Singer <felixsinger@posteo.net> | 2022-12-11 13:20:41 +0000 |
commit | 9eca01d601ccb8afba483b2f5c631a482ca4737e (patch) | |
tree | fe7d89774e29009fc16fe90ad7a41ec223dad09d /ch341a_spi.c | |
parent | 59ce5615b768fe9d4d2506cb13c6781cd83a12e6 (diff) | |
download | flashrom-9eca01d601ccb8afba483b2f5c631a482ca4737e.tar.gz flashrom-9eca01d601ccb8afba483b2f5c631a482ca4737e.tar.bz2 flashrom-9eca01d601ccb8afba483b2f5c631a482ca4737e.zip |
libflashrom.c: Invert if conditions to improve the readability
Invert some if conditions to improve the readability of the code.
Instead of running some code if the specific condition applies, error
out early and reduce the indentation levels.
Also, while at it, move the initializers for these for-loops iterators
into their constructs. They are only used by them.
Change-Id: I4021d8802cd041dcca29a226af0798ebd9c5a81b
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68153
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'ch341a_spi.c')
0 files changed, 0 insertions, 0 deletions