diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2019-06-09 17:09:25 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2019-06-21 15:08:30 +0000 |
commit | e276411e82588e93a8578b5eadd672ecd35058ee (patch) | |
tree | e097d63f30075b36a289683ff922ba7a89f2c6da | |
parent | a67ac58dd7d62de17b7d1d8a13b327dd825502f6 (diff) | |
download | flashrom-e276411e82588e93a8578b5eadd672ecd35058ee.tar.gz flashrom-e276411e82588e93a8578b5eadd672ecd35058ee.tar.bz2 flashrom-e276411e82588e93a8578b5eadd672ecd35058ee.zip |
fmap.c: Remove unneeded 'else'
'else' is not needed after a 'break' or 'return'.
Change-Id: I5df4d8075be012b9edf7be520d611042d9945094
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33345
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-rw-r--r-- | fmap.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -132,9 +132,8 @@ int fmap_read_from_buffer(struct fmap **fmap_out, const uint8_t *const buf, size if (offset < 0) { msg_gdbg("Unable to find fmap in provided buffer.\n"); return 2; - } else { - msg_gdbg("Found fmap at offset 0x%06zx\n", (size_t)offset); } + msg_gdbg("Found fmap at offset 0x%06zx\n", (size_t)offset); const struct fmap *fmap = (const struct fmap *)(buf + offset); *fmap_out = malloc(fmap_size(fmap)); @@ -251,10 +250,9 @@ static int fmap_bsearch_rom(struct fmap **fmap_out, struct flashctx *const flash msg_gdbg("fmap found at offset 0x%06zx\n", offset); fmap_found = 1; break; - } else { - msg_gerr("fmap signature found at %zu but header is invalid.\n", offset); - ret = 2; } + msg_gerr("fmap signature found at %zu but header is invalid.\n", offset); + ret = 2; } if (fmap_found) |