]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwbimage: Simplify iteration over version 1 optional headers
authorMarek Behún <marek.behun@nic.cz>
Tue, 17 Aug 2021 22:59:15 +0000 (00:59 +0200)
committerStefan Roese <sr@denx.de>
Fri, 1 Oct 2021 09:07:13 +0000 (11:07 +0200)
commit386f9608c926d47986bc77afd91938bb2c4c8659
tree27b97089edc0e1be40959712a6461b7d568b5c52
parent38c7b0cc76cfc7446f1a43a73bbb5eb62a0e078b
tools: kwbimage: Simplify iteration over version 1 optional headers

Create macro
  for_each_opt_hdr_v1
and functions
  opt_hdr_v1_size(),
  opt_hdr_v1_valid_size(),
  opt_hdr_v1_ext(),
  opt_hdr_v1_first() and
  opt_hdr_v1_next()
to simplify iteration over version 1 optional headers.

This prevents ugly code repetition and makes it nicer to read.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
tools/kwbimage.c
tools/kwbimage.h