[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] pci-arbiter: Remove spurious memset()
From: |
Joan Lledó |
Subject: |
[PATCH] pci-arbiter: Remove spurious memset() |
Date: |
Sat, 9 Nov 2019 10:35:31 +0100 (CET) |
From: Joan Lledó <jlledom@member.fsf.org>
* pci-arbiter/pcifs.c:
* create_fs_tree:
Remove all memset() previous to snprintf() calls.
---
pci-arbiter/pcifs.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/pci-arbiter/pcifs.c b/pci-arbiter/pcifs.c
index cc08fad0..aaee7f0b 100644
--- a/pci-arbiter/pcifs.c
+++ b/pci-arbiter/pcifs.c
@@ -207,7 +207,6 @@ create_fs_tree (struct pcifs * fs)
/* We've found a new domain. Add an entry for it */
e_stat = list->stat;
e_stat.st_mode &= ~S_IROOT; /* Remove the root mode */
- memset (entry_name, 0, NAME_SIZE);
snprintf (entry_name, NAME_SIZE, "%04x", device->domain);
err =
create_dir_entry (device->domain, -1, -1, -1, -1, entry_name,
@@ -225,7 +224,6 @@ create_fs_tree (struct pcifs * fs)
if (device->bus != c_bus)
{
/* We've found a new bus. Add an entry for it */
- memset (entry_name, 0, NAME_SIZE);
snprintf (entry_name, NAME_SIZE, "%02x", device->bus);
err =
create_dir_entry (device->domain, device->bus, -1, -1, -1,
@@ -243,7 +241,6 @@ create_fs_tree (struct pcifs * fs)
if (device->dev != c_dev)
{
/* We've found a new dev. Add an entry for it */
- memset (entry_name, 0, NAME_SIZE);
snprintf (entry_name, NAME_SIZE, "%02x", device->dev);
err =
create_dir_entry (device->domain, device->bus, device->dev, -1,
@@ -262,7 +259,6 @@ create_fs_tree (struct pcifs * fs)
e_stat.st_mode &= ~(S_IROTH | S_IWOTH | S_IXOTH);
/* Add func entry */
- memset (entry_name, 0, NAME_SIZE);
snprintf (entry_name, NAME_SIZE, "%01u", device->func);
err =
create_dir_entry (device->domain, device->bus, device->dev,
--
2.20.1
- Re: [PATCH] pci-arbiter: Remove embedded pciaccess code, Joan Lledó, 2019/11/03
- Re: [PATCH] pci-arbiter: Remove embedded pciaccess code, Joan Lledó, 2019/11/03
- [PATCH 2/4] pci-arbiter: Call libpciaccess cleanup on shutdown, Joan Lledó, 2019/11/03
- [PATCH 4/4] pci-arbiter: Fix warning on passing incompatible pointer type, Joan Lledó, 2019/11/03
- [PATCH 3/4] pci-arbiter: Fix a -Wstringop-truncation warning, Joan Lledó, 2019/11/03
- Re: [PATCH 3/4] pci-arbiter: Fix a -Wstringop-truncation warning, Samuel Thibault, 2019/11/03
- Re: [PATCH 3/4] pci-arbiter: Fix a -Wstringop-truncation warning, James Clarke, 2019/11/03
- Re: [PATCH 3/4] pci-arbiter: Fix a -Wstringop-truncation warning, Samuel Thibault, 2019/11/03
- Re: [PATCH 3/4] pci-arbiter: Fix a -Wstringop-truncation warning, Joan Lledó, 2019/11/09
- [PATCH] pci-arbiter: Remove spurious memset(),
Joan Lledó <=
- Re: [PATCH] pci-arbiter: Remove spurious memset(), Samuel Thibault, 2019/11/09
[PATCH 1/4] pci-arbiter: Remove embedded pciaccess code, Joan Lledó, 2019/11/03
Re: [PATCH] pci-arbiter: Remove embedded pciaccess code, Samuel Thibault, 2019/11/03