diff options
author | Joan Lledó <jlledom@member.fsf.org> | 2020-05-02 19:27:32 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-05-02 19:42:41 +0200 |
commit | 0ea8d21ac707ead90cb9e0edcc66bc69224f9949 (patch) | |
tree | 4eaf2d58c39fd05956cc813763c8835e60c10406 /pci-arbiter | |
parent | 59e95c82ffee0de569efbf77e1206dc85ef34f9b (diff) | |
download | hurd-0ea8d21ac707ead90cb9e0edcc66bc69224f9949.tar.gz hurd-0ea8d21ac707ead90cb9e0edcc66bc69224f9949.tar.bz2 hurd-0ea8d21ac707ead90cb9e0edcc66bc69224f9949.zip |
Memset directory entries to zero during their creation
* pci-arbiter/pcifs.c:
* create_dir_entry: Add memset()
* create_fs_tree: Remove memset()
Message-Id: <20200502172713.18654-2-jlledom@mailfence.com>
Diffstat (limited to 'pci-arbiter')
-rw-r--r-- | pci-arbiter/pcifs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pci-arbiter/pcifs.c b/pci-arbiter/pcifs.c index d19fc618..615e8753 100644 --- a/pci-arbiter/pcifs.c +++ b/pci-arbiter/pcifs.c @@ -40,6 +40,8 @@ create_dir_entry (int32_t domain, int16_t bus, int16_t dev, { uint16_t parent_num_entries; + memset (entry, 0, sizeof (struct pcifs_dirent)); + entry->domain = domain; entry->bus = bus; entry->dev = dev; @@ -199,7 +201,6 @@ create_fs_tree (struct pcifs * fs) return ENOMEM; e = list + 1; - memset (e, 0, sizeof (struct pcifs_dirent)); c_domain = c_bus = c_dev = -1; domain_parent = bus_parent = dev_parent = func_parent = 0; iter = pci_slot_match_iterator_create(&match); |