Nitrokey / libnitrokey

Communicate with Nitrokey devices in a clean and easy manner
https://nitrokey.com/
GNU Lesser General Public License v3.0
65 stars 34 forks source link

Don't copy strings needlessly in NK_list_devices_by_cpuID #213

Closed d-e-s-o closed 2 years ago

d-e-s-o commented 2 years ago

An auto variable being assigned to may cause a copy of the object, even if only a reference is necessary (and desired). That can easily be cause for performance issues, especially in for loops. This change fixes one such problem found in the NK_list_devices_by_cpuID function.

szszszsz commented 2 years ago

Merged, thank you!