Make calendarhome buffer static

the value may be used in error messages after leaving this function.
This commit is contained in:
Stefan Eßer 2020-12-30 13:42:48 +01:00
parent 59f46e34cf
commit e163cae76e

View File

@ -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");