payloads,src: Replace ALIGN(x, a) by ALIGN_UP(x, a) for clarity
Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Change-Id: I80f3d2c90c58daa62651f6fd635c043b1ce38b84 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68255 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
@@ -37,7 +37,7 @@ static FILE *fopen(const char *path, const char *mode)
|
||||
} else {
|
||||
previous_file = current_file;
|
||||
current_file =
|
||||
(FILE *)(ALIGN(((unsigned long)previous_file->data
|
||||
(FILE *)(ALIGN_UP(((unsigned long)previous_file->data
|
||||
+ previous_file->len), 16));
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ static FILE *fopen(const char *path, const char *mode)
|
||||
current_file->filename = (char *)¤t_file[1];
|
||||
strcpy(current_file->filename, path);
|
||||
current_file->data =
|
||||
(char *)ALIGN(((unsigned long)current_file->filename
|
||||
(char *)ALIGN_UP(((unsigned long)current_file->filename
|
||||
+ strlen(path) + 1), 16);
|
||||
current_file->offset = 0;
|
||||
current_file->len = 0;
|
||||
|
||||
Reference in New Issue
Block a user