From 85dab53e12ac540e4f2f2a69590136d9294774eb Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Tue, 29 Nov 2022 02:25:05 +0400 Subject: [PATCH] Remove unnecessary logging --- build_config.rb | 1 - src/libc.c | 25 +++---------------------- src/main.c | 2 -- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/build_config.rb b/build_config.rb index 40f3b12..d379c7c 100644 --- a/build_config.rb +++ b/build_config.rb @@ -2,7 +2,6 @@ MRuby::CrossBuild.new ENV.fetch 'BUILD_NAME' do |conf| conf.toolchain :gcc conf.gem core: 'mruby-compiler' - conf.gem core: 'mruby-enumerator' conf.cc.flags << '-Wall' << diff --git a/src/libc.c b/src/libc.c index 4b45a41..661d050 100644 --- a/src/libc.c +++ b/src/libc.c @@ -52,39 +52,20 @@ void my_exit(const int status) void *my_calloc(size_t nmemb, size_t size) { - void *const result = KernAux_Malloc_calloc(&allocator.malloc, nmemb, size); - if (result) { - kernaux_drivers_console_printf("calloc(%lu, %lu) = %p\n", nmemb, size, result); - } else if (nmemb * size != 0) { - kernaux_drivers_console_printf("!calloc(%lu, %lu)\n", nmemb, size); - } - return result; + return KernAux_Malloc_calloc(&allocator.malloc, nmemb, size); } void my_free(void *ptr) { - kernaux_drivers_console_printf("free(%p)\n", ptr); KernAux_Malloc_free(&allocator.malloc, ptr); } void *my_malloc(size_t size) { - void *const result = KernAux_Malloc_malloc(&allocator.malloc, size); - if (result) { - kernaux_drivers_console_printf("malloc(%lu) = %p\n", size, result); - } else if (size != 0) { - kernaux_drivers_console_printf("!malloc(%lu)\n", size); - } - return result; + return KernAux_Malloc_malloc(&allocator.malloc, size); } void *my_realloc(void *ptr, size_t size) { - void *const result = KernAux_Malloc_realloc(&allocator.malloc, ptr, size); - if (result) { - kernaux_drivers_console_printf("realloc(%p, %lu) = %p\n", ptr, size, result); - } else if (size != 0) { - kernaux_drivers_console_printf("!realloc(%p, %lu)\n", ptr, size); - } - return result; + return KernAux_Malloc_realloc(&allocator.malloc, ptr, size); } diff --git a/src/main.c b/src/main.c index e98550d..8b21caa 100644 --- a/src/main.c +++ b/src/main.c @@ -31,8 +31,6 @@ void main( const uint32_t multiboot2_info_magic, const struct KernAux_Multiboot2_Info *const multiboot2_info ) { - kernaux_drivers_console_puts("========================================"); - kernaux_assert_cb = assert; ASSERT(multiboot2_info_magic == KERNAUX_MULTIBOOT2_INFO_MAGIC);