diary

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

commit 6c5ae4f34cd7a76398b6b889fd2aa5a5bcd39465
parent f61358134173ed79d40dfa9e76af0653a2b186e8
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Mon, 31 May 2021 23:23:13 +0200

mark input json to extract_json_value as const

Diffstat:
Mutils.c | 2+-
Mutils.h | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils.c b/utils.c @@ -1,6 +1,6 @@ #include "utils.h" -char* extract_json_value(char* json, char* key, bool quoted) { +char* extract_json_value(const char* json, char* key, bool quoted) { // work on a copy of the json char* jsoncp = (char*) malloc(strlen(json) * sizeof(char)); strcpy(jsoncp, json); diff --git a/utils.h b/utils.h @@ -21,7 +21,7 @@ #define ASIDE_WIDTH 4 #define MAX_MONTH_HEIGHT 6 -char* extract_json_value(char* json, char* key, bool quoted); +char* extract_json_value(const char* json, char* key, bool quoted); char* extract_ical_field(const char* ical, char* key, bool multline); char* expand_path(const char* str); char* strrstr(char *haystack, char *needle);