diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | README | LICENSE

commit b1b0f671413a2a9e038a29349b6dddd4459e9fb5
parent 88582517d6d854dc2b64d651e7731e7a8b83ecec
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Tue, 13 Jul 2021 23:58:30 +0200

loop initial declarations are only allowed in C99 mode

Diffstat:
Msrc/caldav.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/caldav.c b/src/caldav.c @@ -18,7 +18,8 @@ void random_code_challenge(size_t len, char* dest) { char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~"; size_t alphabet_size = strlen(alphabet); - for (int i = 0; i < len; i++) { + int i = 0; + for (i = 0; i < len; i++) { dest[i] = alphabet[rand() % alphabet_size]; } dest[len-1] = '\0';