cgmnlm

Unnamed repository; edit this file 'description' to name the repository.
git clone git://code.clttr.info/cgmnlm.git
Log | Files | Refs | README | LICENSE

commit 4e73bec32786491b54ba3f2b1e93e6e28bd4f4be
parent 2fe9bafc5cb5da96adf9068505d79bfbe9a82e9a
Author: René Wagner <rwa@clttr.info>
Date:   Mon,  1 Nov 2021 09:11:29 +0100

fix maybe uninitialized warning

Diffstat:
Msrc/gmnlm.c | 9++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c @@ -810,12 +810,7 @@ do_prompts(const char *prompt, struct browser *browser) goto exit; } set_url(browser, url, NULL); - char file[1024] = {0}; - strncpy(file, trim_ws(&in[1]), sizeof(file)); - if (file[0] == '~') { - snprintf(file, sizeof(file), "%s%s", getenv("HOME"), &trim_ws(&in[1])[1]); - } - download_resp(browser->tty, resp, file, url); + download_resp(browser->tty, resp, trim_ws(&in[1]), url); gemini_response_finish(&resp); result = PROMPT_AGAIN; goto exit; @@ -963,7 +958,7 @@ display_gemini(struct browser *browser, struct gemini_response *resp) fprintf(out, "\n"); char *text = NULL; int row = 0, col = 0; - bool alttext_printed; + bool alttext_printed = false; struct gemini_token tok; struct link **next = &browser->links; // When your screen is too narrow, more lines will be used for helptext and URL.