Ver Fonte

readelf: Remove an unnecessary String::format()

Andreas Kling há 4 anos atrás
pai
commit
46209ee9d0
1 ficheiros alterados com 1 adições e 2 exclusões
  1. 1 2
      Userland/Utilities/readelf.cpp

+ 1 - 2
Userland/Utilities/readelf.cpp

@@ -492,9 +492,8 @@ int main(int argc, char** argv)
     if (display_elf_header) {
     if (display_elf_header) {
         printf("ELF header:\n");
         printf("ELF header:\n");
 
 
-        String magic = String::format("%s", header.e_ident);
         printf("  Magic:                             ");
         printf("  Magic:                             ");
-        for (char i : magic) {
+        for (char i : StringView { header.e_ident, sizeof(header.e_ident) }) {
             if (isprint(i)) {
             if (isprint(i)) {
                 printf("%c ", i);
                 printf("%c ", i);
             } else {
             } else {