已开启
target: replace bzero with memset #24
AtomGit-Bot创建于 2024年4月16日
target: replace bzero with memset #24
已开启
AtomGit-Bot创建于 2024年4月16日
从refs/pull/24/head合入到openEuler-20.03-LTS-SP3
共 2 个文件变更+32-1
@@ -0,0 +1,27 @@
1+From d097b2444dba33d312f6cc8fe70889c9e0a4ad34 Mon Sep 17 00:00:00 2001
2+From: Rosen Penev <rosenp@gmail.com>
3+Date: Sat, 15 Aug 2020 15:36:28 -0700
4+Subject: [PATCH] target: replace bzero with memset
5+ 
6+bzero is deprecated and replaced witth memset.
7+ 
8+---
9+ usr/iscsi/target.c | 2 +-
10+ 1 file changed, 1 insertion(+), 1 deletion(-)
11+ 
12+diff --git a/usr/iscsi/target.c b/usr/iscsi/target.c
13+index b2ee8b1..156ab02 100644
14+--- a/usr/iscsi/target.c
15++++ b/usr/iscsi/target.c
16+@@ -224,7 +224,7 @@ get_redirect_address(char *callback, char *buffer, int buflen,
17+ {
18+ char *p, *addr, *port;
19+
20+- bzero(buffer, buflen);
21++ memset(buffer, 0, buflen);
22+ if (call_program(callback, NULL, NULL, buffer, buflen, 0))
23+ return -1;
24+
25+--
26+2.27.0
27+ 
@@ -6,7 +6,7 @@
6Summary: The SCSI target daemon and utility programs6Summary: The SCSI target daemon and utility programs
7Name: scsi-target-utils7Name: scsi-target-utils
8Version: 1.0.798Version: 1.0.79
9-Release: 59+Release: 6
10License: GPLv210License: GPLv2
11URL: http://stgt.sourceforge.net/11URL: http://stgt.sourceforge.net/
12Source0: https://github.com/fujita/tgt/archive/v%{version}/tgt-v%{version}.tar.gz12Source0: https://github.com/fujita/tgt/archive/v%{version}/tgt-v%{version}.tar.gz
@@ -19,6 +19,7 @@ Patch1: 0002-remove-check-for-xsltproc.patch
19Patch2: 0003-default-config.patch19Patch2: 0003-default-config.patch
20Patch3: tgt-1.0.79-Adapt-to-glusterfs-api-7.6.3.patch20Patch3: tgt-1.0.79-Adapt-to-glusterfs-api-7.6.3.patch
21Patch4: fix-old-logmsg-lost.patch21Patch4: fix-old-logmsg-lost.patch
22+Patch5: replace-bzero-with-memset.patch
22 23 
23BuildRequires: docbook-style-xsl gcc libaio-devel libxslt perl-generators pkgconfig systemd-devel systemd-units24BuildRequires: docbook-style-xsl gcc libaio-devel libxslt perl-generators pkgconfig systemd-devel systemd-units
24%if 0%{?with_rdma}25%if 0%{?with_rdma}
@@ -118,6 +119,9 @@ pushd usr
118%{_mandir}/man8/*119%{_mandir}/man8/*
119 120 
120%changelog121%changelog
122+* Tue Apr 16 2024 yanshuai <yanshuai@kylinos.cn> - 1.0.79-6
123+- target: replace bzero with memset
124+ 
121* Thu Mar 21 2024 yanshuai <yanshuai@kylinos.cn> - 1.0.79-5125* Thu Mar 21 2024 yanshuai <yanshuai@kylinos.cn> - 1.0.79-5
122- fix old logmsg to be lost126- fix old logmsg to be lost
123 127