From adeb5e5e4554deed1967e86216a30821243b9579 Mon Sep 17 00:00:00 2001 From: Anjali Nijhara Date: Wed, 29 Nov 2023 11:04:06 +0530 Subject: [PATCH] Fix SVACE Issue WGID : 554015 Change-Id: Ic703a5cbc2c9c7eb4cea47a58e697bb5fc2ebf25 --- plugin/online-monitor/online-monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/online-monitor/online-monitor.c b/plugin/online-monitor/online-monitor.c index 6f5b10d..d015956 100755 --- a/plugin/online-monitor/online-monitor.c +++ b/plugin/online-monitor/online-monitor.c @@ -238,12 +238,13 @@ static void start_monitoring(void) int rv = 0, key; long long value = 0; char bpf_file[256]; + char error_buf[MAX_SIZE_ERROR_BUFFER] = {0, }; bpf_info.map_fd = bpf_map_create(BPF_MAP_TYPE_ARRAY,"count_map", sizeof(key), sizeof(value), 256, NULL); if (bpf_info.map_fd < 0) { - DBG("failed to create map %s", strerror(errno)); + DBG("failed to create map %s", strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER)); return; } -- 2.34.1