From e163cae76ec73bb5e20185c066518ec646d0f34f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Wed, 30 Dec 2020 13:42:48 +0100 Subject: [PATCH] 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");