diff --git a/lib/log_table.c b/lib/log_table.c index 8b3b56647..1e30b56db 100644 --- a/lib/log_table.c +++ b/lib/log_table.c @@ -63,8 +63,8 @@ void table_header(struct table *t) { NOINDENT struct log *l = global_log ? global_log : &default_log; - if (t->width != l->window.ws_col - 24) - table_resize(t, l->window.ws_col - 24); + if (t->width != l->window.ws_col - 30) + table_resize(t, l->window.ws_col - 30); char *line1 = strf("\b\b" BOX_UD); char *line0 = strf("\b"); @@ -115,8 +115,8 @@ void table_row(struct table *t, ...) { NOINDENT struct log *l = global_log ? global_log : &default_log; - if (t->width != l->window.ws_col - 24) { - table_resize(t, l->window.ws_col - 24); + if (t->width != l->window.ws_col - 30) { + table_resize(t, l->window.ws_col - 30); table_header(t); } @@ -150,8 +150,8 @@ void table_footer(struct table *t) { NOINDENT struct log *l = global_log ? global_log : &default_log; - if (t->width != l->window.ws_col - 24) - table_resize(t, l->window.ws_col - 24); + if (t->width != l->window.ws_col - 30) + table_resize(t, l->window.ws_col - 30); char *line = strf("\b"); diff --git a/lib/memory.c b/lib/memory.c index 44b52d208..af41b9a85 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -125,6 +125,7 @@ int memory_heap_free(struct memtype *m, void *ptr, size_t len) /** Allocate memory backed by hugepages with malloc() like interface */ static void * memory_hugepage_alloc(struct memtype *m, size_t len, size_t alignment) { + void *ret; int prot = PROT_READ | PROT_WRITE; int flags = MAP_PRIVATE | MAP_ANONYMOUS; @@ -137,12 +138,9 @@ static void * memory_hugepage_alloc(struct memtype *m, size_t len, size_t alignm flags |= MAP_LOCKED; #endif - void *ret = mmap(NULL, len, prot, flags, -1, 0); - - if (ret == MAP_FAILED) { - info("Failed to allocate huge pages: Check https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt (%s)", strerror(errno)); + ret = mmap(NULL, len, prot, flags, -1, 0); + if (ret == MAP_FAILED) return NULL; - } return ret; }