diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-28 12:30:48 +0100 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-28 12:30:48 +0100 |
commit | 8b80b2a919012560b72405e3e34993b8ad35b82c (patch) | |
tree | 259f0b5175a20733ab08f841c02c1511e9cc5661 | |
parent | 1168c080af2f2f901a08886b670228a05ce74b77 (diff) | |
download | rpi-MMU-example-8b80b2a919012560b72405e3e34993b8ad35b82c.tar.gz rpi-MMU-example-8b80b2a919012560b72405e3e34993b8ad35b82c.zip |
write the same null-padding loop a saner way
-rw-r--r-- | makefs.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -49,7 +49,7 @@ int main(int argc, char **argv) errx(-1, "error writing to stdout"); // pad with null-bytes until a 4-aligned offset - for (unsigned int j = 0; (j + (name_size & 0b11)) & 0b11; j++) + for (uint32_t j = 0; (j + name_size) & 0b11; j++) if (putchar('\0')) errx(-1, "error writing to stdout"); @@ -82,7 +82,7 @@ int main(int argc, char **argv) } // again, pad with null-bytes until a 4-aligned offset - for (int j = 0; (j + (file_size & 0b11)) & 0b11; j++) + for (uint32_t j = 0; (j + file_size) & 0b11; j++) if (putchar('\0')) errx(-1, "error writing to stdout"); } |