numatop/0013-common-Remove-unnecessary-temp-buffer.patch
Pingfan Liu 0017647c65 back port
Resolves: https://issues.redhat.com/browse/RHEL-24552

Signed-off-by: Pingfan Liu <piliu@redhat.com>
2024-09-19 19:43:37 +08:00

33 lines
845 B
Diff

From 3eb83bcb5ff91d3390e03acccad0fd8c89171a53 Mon Sep 17 00:00:00 2001
From: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
Date: Mon, 4 Mar 2024 23:02:15 +0100
Subject: [PATCH 13/32] common: Remove unnecessary temp buffer
---
common/win.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/win.c b/common/win.c
index 910d267..c06f42d 100644
--- a/common/win.c
+++ b/common/win.c
@@ -484,14 +484,11 @@ topnproc_data_show(dyn_win_t *win)
static void
load_msg_show(void)
{
- char content[64];
win_reg_t r;
- (void) snprintf(content, sizeof (content), "Loading ...");
-
(void) reg_init(&r, 0, 1, g_scr_width, g_scr_height - 1, A_BOLD);
reg_erase(&r);
- reg_line_write(&r, 1, ALIGN_LEFT, content);
+ reg_line_write(&r, 1, ALIGN_LEFT, "Loading ...");
reg_refresh(&r);
reg_win_destroy(&r);
}
--
2.41.0