diff options
author | Jean-Baptiste Boric <jblbeurope@gmail.com> | 2021-03-13 22:03:26 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-17 23:22:42 +0100 |
commit | ade6343fca5b1245b997e793ba54139ba8824ea0 (patch) | |
tree | 9a2d15b0d3c3bfa37586dc0a27a71a78696e21c5 | |
parent | 7a079f778097502d12d90962a58e422e0d76d14e (diff) | |
download | serenity-ade6343fca5b1245b997e793ba54139ba8824ea0.zip |
Userland: Fix printf specifiers with off_t
In theory we should probably use the 'j' qualifier, but we don't
support it.
-rw-r--r-- | Userland/Services/WebServer/Client.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/ls.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/stat.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Services/WebServer/Client.cpp b/Userland/Services/WebServer/Client.cpp index 0c66e91369..1ed012ede8 100644 --- a/Userland/Services/WebServer/Client.cpp +++ b/Userland/Services/WebServer/Client.cpp @@ -240,7 +240,7 @@ void Client::handle_directory_listing(const String& requested_path, const String builder.append(escape_html_entities(name)); builder.append("</a></td><td> </td>"); - builder.appendf("<td>%10zd</td><td> </td>", st.st_size); + builder.appendf("<td>%10lld</td><td> </td>", st.st_size); builder.append("<td>"); builder.append(Core::DateTime::from_timestamp(st.st_mtime).to_string()); builder.append("</td>"); diff --git a/Userland/Utilities/ls.cpp b/Userland/Utilities/ls.cpp index 3e3f74c75d..2510d58982 100644 --- a/Userland/Utilities/ls.cpp +++ b/Userland/Utilities/ls.cpp @@ -312,7 +312,7 @@ static bool print_filesystem_object(const String& path, const String& name, cons if (flag_human_readable) { printf(" %10s ", human_readable_size((size_t)st.st_size).characters()); } else { - printf(" %10zd ", st.st_size); + printf(" %10lld ", st.st_size); } } diff --git a/Userland/Utilities/stat.cpp b/Userland/Utilities/stat.cpp index 05501ced25..02b42038dd 100644 --- a/Userland/Utilities/stat.cpp +++ b/Userland/Utilities/stat.cpp @@ -48,7 +48,7 @@ static int stat(const char* file, bool should_follow_links) if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)) printf(" Device: %u,%u\n", major(st.st_rdev), minor(st.st_rdev)); else - printf(" Size: %zd\n", st.st_size); + printf(" Size: %lld\n", st.st_size); printf(" Links: %u\n", st.st_nlink); printf(" Blocks: %u\n", st.st_blocks); printf(" UID: %u", st.st_uid); |