diary

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

commit 3f63550984c427274b7bfc13c6ebbf74cbbb2217
parent 213288009472f899673ded764e2b262786bba6fa
Author: Matthias Beyer <mail@beyermatthias.de>
Date:   Fri, 18 Nov 2016 14:51:21 +0100

fixup! Move constant out of function, minify iteration

Diffstat:
Mdiary.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/diary.c b/diary.c @@ -16,11 +16,11 @@ char curs_date_str[70]; struct tm cal_start; struct tm cal_end; -static const char* WEEKDAYS[] = {"Mo","Tu","We","Th","Fr","Sa","Su",0}; +static const char* WEEKDAYS[] = {"Mo","Tu","We","Th","Fr","Sa","Su", NULL}; void draw_wdays(WINDOW* head) { - for (char* wd = WEEKDAYS; *wd; wd++) { - waddstr(head, wd); + for (char** wd = (char**)WEEKDAYS; *wd; wd++) { + waddstr(head, *wd); waddch(head, ' '); } wrefresh(head);