configure.ac: Don't search for c++ compiler

There is no C++ code to be compiled in the repository.

Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
cbootimage: simplify code

Testing for e == 0 after exiting the function in any other
case a couple of lines earlier is useless.

Found-by: Coverity Scan
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
data_layout: improve memory handling

- free empty_blk if it's allocated and there's an error
- only free empty_blk if it's non-NULL. While POSIX
  requests such free()s to be safe, some implementations
  (eg Solaris) aren't compliant.

Found-by: Coverity Scan
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
data_layout: fail better on file access errors

fread could return only a partial result
(eg. NVBOOT_CONFIG_TABLE_SIZE_MAX - 1 bytes),
which right now would be accepted and only
resolved by later code.

Found-by: Coverity Scan
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>