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
1 changed files with 1 additions and 1 deletions

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);