#49002 Replace memset on struct allocation
Closed: wontfix None Opened 7 years ago by firstyear.

c99 supports the following:

struct Slapi_PBlock pb = {0};

This creates a null struct on the stack. Which is a lot nicer that memsetting the value.

We should improve this where possible through out our code.


I was very careful to leave memsets in for and while loops where they are needed. I only removed or replaced where it would be safe. Additionally, this extends to a reduction in the calls to pblock_init, which also would have been a huge cost on the server (712 byte writes, very frequently).

commit b1f434e
Writing objects: 100% (77/77), 10.81 KiB | 0 bytes/s, done.
Total 77 (delta 65), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
86bffc8..b1f434e master -> master

Metadata Update from @firstyear:
- Issue assigned to firstyear
- Issue set to the milestone: 1.3.6 backlog

7 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/2061

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata