diary

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

commit f9990658aad6f59689303aafc45818eacaa3d46a
parent 60cf2911abc177e4d28ac22f85398d32c05dd7d1
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Tue, 21 Jun 2022 13:21:40 +0200

fix(typo): expaned_value

Diffstat:
Msrc/diary.c | 24++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/diary.c b/src/diary.c @@ -289,12 +289,12 @@ struct tm find_closest_entry(const struct tm current, } bool read_config(const char* file_path) { - char* expaned_value; + char* expanded_value; char config_file_path[256]; - expaned_value = expand_path(file_path); - strcpy(config_file_path, expaned_value); - free(expaned_value); + expanded_value = expand_path(file_path); + strcpy(config_file_path, expanded_value); + free(expanded_value); // check if config file is readable if( access( config_file_path, R_OK ) != 0 ) { @@ -316,10 +316,10 @@ bool read_config(const char* file_path) { if (sscanf(line, "%79s = %79s", key_buf, value_buf) == 2) { if (strcmp("dir", key_buf) == 0) { - expaned_value = expand_path(value_buf); - CONFIG.dir = (char *) malloc(strlen(expaned_value) + 1 * sizeof(char)); - strcpy(CONFIG.dir, expaned_value); - free(expaned_value); + expanded_value = expand_path(value_buf); + CONFIG.dir = (char *) malloc(strlen(expanded_value) + 1 * sizeof(char)); + strcpy(CONFIG.dir, expanded_value); + free(expanded_value); } else if (strcmp("range", key_buf) == 0) { CONFIG.range = atoi(value_buf); } else if (strcmp("weekday", key_buf) == 0) { @@ -345,10 +345,10 @@ bool read_config(const char* file_path) { CONFIG.editor = (char *) malloc(strlen(value_buf) + 1 * sizeof(char)); strcpy(CONFIG.editor, value_buf); } else if (strcmp("google_tokenfile", key_buf) == 0) { - expaned_value = expand_path(value_buf); - CONFIG.google_tokenfile = (char *) malloc(strlen(expaned_value) + 1 * sizeof(char)); - strcpy(CONFIG.google_tokenfile, expaned_value); - free(expaned_value); + expanded_value = expand_path(value_buf); + CONFIG.google_tokenfile = (char *) malloc(strlen(expanded_value) + 1 * sizeof(char)); + strcpy(CONFIG.google_tokenfile, expanded_value); + free(expanded_value); } else if (strcmp("google_clientid", key_buf) == 0) { CONFIG.google_clientid = (char *) malloc(strlen(value_buf) + 1 * sizeof(char)); strcpy(CONFIG.google_clientid, value_buf);