Permission: refactor getPermissionFromPassword() to return std::optional

This replaces the output parameter (which is bad API design).  As a
side effect, it fixes the bad [[gnu::pure]] attribute added by commit
a636d2127 which caused optimizing compilers to miscompile calls to
that function.  "Pure" functions can be assumed to have no output
arguments, so the compiler can assume the function doesn't modify
them.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1282
This commit is contained in:
Max Kellermann
2021-10-17 19:50:59 +02:00
parent 6a2e7bbc02
commit 907af2ad02
4 changed files with 16 additions and 10 deletions

1
NEWS
View File

@@ -1,5 +1,6 @@
ver 0.23.1 (not yet released)
* fix libfmt linker problems
* fix broken password authentication
ver 0.23 (2021/10/14)
* protocol