Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Dec 2020 12:45:55 GMT
From:      Stefan Eßer <se@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e163cae76ec7 - main - Make calendarhome buffer static
Message-ID:  <202012301245.0BUCjtjs096570@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by se:

URL: https://cgit.FreeBSD.org/src/commit/?id=e163cae76ec73bb5e20185c066518ec646d0f34f

commit e163cae76ec73bb5e20185c066518ec646d0f34f
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2020-12-30 12:42:48 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2020-12-30 12:44:33 +0000

    Make calendarhome buffer static
    
    the value may be used in error messages after leaving this function.
---
 usr.bin/calendar/io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c
index adea085cf3da..24966399c179 100644
--- a/usr.bin/calendar/io.c
+++ b/usr.bin/calendar/io.c
@@ -122,7 +122,7 @@ cal_fopen(const char *file)
 	unsigned int i;
 	struct stat sb;
 	static bool warned = false;
-	char calendarhome[MAXPATHLEN];
+	static char calendarhome[MAXPATHLEN];
 
 	if (home == NULL || *home == '\0') {
 		warnx("Cannot get home directory");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012301245.0BUCjtjs096570>