Actions
Optimization #4427
closedstorage api: use dedicated 'id' type
Effort:
Difficulty:
Label:
Description
The various wrappers of the storage API all use the same int
type for their id's. This means the compiler can't know if we use the wrong id in the wrong wrapper, which has lead to at least one bug (#4348/#4424).
To avoid this in the future we should change the id type to wrapper specific struct that embeds the int. This way the compiler can enforce this for us.
There are 4 such wrappers: flow, ippair, host and device.
The flow has been done in: https://github.com/OISF/suricata/commit/bc667a4a939c887bc298bbb865eda4338f8cea2f
Actions