Page MenuHomeSoftware Heritage

the key has a fixed len: do not hardcode it
ClosedPublic

Authored by dachary on Jan 25 2022, 3:19 PM.

Details

Summary

and add a safeguard in case the caller provides a key with the wrong size

Diff Detail

Repository
rDOPH Perfect Hash algorithm
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D7031 (id=25495)

Rebasing onto 7fd6dbac76...

Current branch diff-target is up to date.
Changes applied before test
commit d79745c582c898202d02e1583240ca94009d962a
Author: Loïc Dachary <loic@dachary.org>
Date:   Tue Jan 25 15:17:23 2022 +0100

    the key has a fixed len: do not hardcode it
    
    and add a safeguard in case the caller provides a key with the wrong size

See https://jenkins.softwareheritage.org/job/DOPH/job/tests-on-diff/25/ for more details.

vlorentz added a subscriber: vlorentz.

I'd reword the commit message as "Deduplicate hardcoded key size"

This revision is now accepted and ready to land.Jan 25 2022, 3:23 PM