diary

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

commit f7764b090cc085873d4d7330ad3c3e15be1b9cfd
parent 8a993ad8bc349d9efdd56be37d9ca87db893e079
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Mon,  5 Jul 2021 01:17:50 +0200

'for' loop initial declarations only 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 @@ -831,6 +831,7 @@ int caldav_sync(struct tm* date, // ask for confirmation strftime(dstr, sizeof dstr, CONFIG.fmt, date); mvwprintw(header, 0, 0, "Remote event is more recent. Sync entry '%s' and overwrite local file? [(Y)es/(a)all/(n)o/(c)ancel] ", dstr); + char* i; bool conf = false; while (!conf) { conf_ch = wgetch(header); @@ -842,7 +843,7 @@ int caldav_sync(struct tm* date, if (cursordate_file == NULL) { perror("Failed to open cursor date file"); } else { - for (char* i = rmt_desc; *i != '\0'; i++) { + for (i = rmt_desc; *i != '\0'; i++) { if (rmt_desc[i-rmt_desc] == 0x5C) { // backslash switch (*(i+1)) { case 'n':