Add patch to fix format errors
This commit is contained in:
parent
263ad33155
commit
290908c9d7
36
format.patch
Normal file
36
format.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
--- numatop-2.2/common/os/os_util.c 2021-09-08 04:29:54.000000000 +0200
|
||||||
|
+++ numatop-2.2/common/os/os_util.c 2022-08-13 15:24:06.607330278 +0200
|
||||||
|
@@ -387,12 +387,10 @@
|
||||||
|
int len = strlen(str);
|
||||||
|
boolean_t ret = B_FALSE;
|
||||||
|
|
||||||
|
- if ((scopy = malloc(len + 1)) == NULL) {
|
||||||
|
+ if ((scopy = strdup(str)) == NULL) {
|
||||||
|
return (B_FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
- strncpy(scopy, str, len);
|
||||||
|
- scopy[len] = 0;
|
||||||
|
cur = scopy;
|
||||||
|
|
||||||
|
while (cur < (scopy + len)) {
|
||||||
|
--- numatop-2.2/common/reg.c 2021-09-08 04:29:54.000000000 +0200
|
||||||
|
+++ numatop-2.2/common/reg.c 2022-08-13 16:16:12.060462958 +0200
|
||||||
|
@@ -240,7 +240,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
if (len > 0) {
|
||||||
|
- (void) mvwprintw(r->hdl, line, pos_x, content);
|
||||||
|
+ (void) mvwprintw(r->hdl, line, pos_x, "%s", content);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (r->mode != 0) {
|
||||||
|
@@ -267,7 +267,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
if (len > 0) {
|
||||||
|
- (void) mvwprintw(r->hdl, line, pos_x, content);
|
||||||
|
+ (void) mvwprintw(r->hdl, line, pos_x, "%s", content);
|
||||||
|
}
|
||||||
|
|
||||||
|
(void) wattroff(r->hdl, A_REVERSE | A_BOLD);
|
@ -9,6 +9,7 @@ Summary: Memory access locality characterization and analysis
|
|||||||
License: BSD
|
License: BSD
|
||||||
URL: https://01.org/numatop
|
URL: https://01.org/numatop
|
||||||
Source: https://github.com/intel/numatop/archive/refs/tags/v%{version}.tar.gz
|
Source: https://github.com/intel/numatop/archive/refs/tags/v%{version}.tar.gz
|
||||||
|
Patch0: format.patch
|
||||||
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -33,7 +34,7 @@ NumaTOP supports the Intel Xeon processors and PowerPC processors.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup
|
%autosetup -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
Reference in New Issue
Block a user