[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pci-arbiter: Remove spurious memset()
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] pci-arbiter: Remove spurious memset() |
Date: |
Sat, 9 Nov 2019 11:47:19 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Joan Lledó via Bug reports for the GNU Hurd, le sam. 09 nov. 2019 10:35:31
+0100, a ecrit:
> From: Joan Lledó <jlledom@member.fsf.org>
>
> * pci-arbiter/pcifs.c:
> * create_fs_tree:
> Remove all memset() previous to snprintf() calls.
Applied, thanks!
> ---
> 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
>
>
--
Samuel
Actually, typing random strings in the Finder does the equivalent of
filename completion.
(Discussion in comp.os.linux.misc on the intuitiveness of commands: file
completion vs. the Mac Finder.)
- 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ó, 2019/11/09
- Re: [PATCH] pci-arbiter: Remove spurious memset(),
Samuel Thibault <=
[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