summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/cbfstool/cbfstool.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index 465580ca30..0939a06002 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -247,8 +247,7 @@ static int cbfstool_convert_mkstage(struct buffer *buffer, uint32_t *offset,
buffer_delete(buffer);
// direct assign, no dupe.
memcpy(buffer, &output, sizeof(*buffer));
- if (header)
- header->len = htonl(output.size);
+ header->len = htonl(output.size);
return 0;
}
@@ -279,8 +278,7 @@ static int cbfstool_convert_mkpayload(struct buffer *buffer,
buffer_delete(buffer);
// direct assign, no dupe.
memcpy(buffer, &output, sizeof(*buffer));
- if (header)
- header->len = htonl(output.size);
+ header->len = htonl(output.size);
return 0;
}
@@ -297,8 +295,7 @@ static int cbfstool_convert_mkflatpayload(struct buffer *buffer,
buffer_delete(buffer);
// direct assign, no dupe.
memcpy(buffer, &output, sizeof(*buffer));
- if (header)
- header->len = htonl(output.size);
+ header->len = htonl(output.size);
return 0;
}