3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-21 22:09:23 +01:00

p2putil: remove static from const strlen

src/p2putil.c: In function 'p2p_get_random_string':
 src/p2putil.c:2641:37: error: initializer element is not constant     2641 |
        static const int set_size = strlen(CHARSET);         |
                     ^~~~~~
This commit is contained in:
Kasper Kantz 2024-07-12 19:32:03 +00:00 committed by Denis Kenzior
parent ffc6d6325d
commit 4f81953338

View File

@ -2638,7 +2638,7 @@ void p2p_get_random_string(char *buf, size_t len)
{
#define CHARSET "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" \
"0123456789"
static const int set_size = strlen(CHARSET);
const int set_size = strlen(CHARSET);
l_getrandom(buf, len);