Make calendarhome buffer static
the value may be used in error messages after leaving this function.
This commit is contained in:
parent
59f46e34cf
commit
e163cae76e
@ -122,7 +122,7 @@ cal_fopen(const char *file)
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
static bool warned = false;
|
static bool warned = false;
|
||||||
char calendarhome[MAXPATHLEN];
|
static char calendarhome[MAXPATHLEN];
|
||||||
|
|
||||||
if (home == NULL || *home == '\0') {
|
if (home == NULL || *home == '\0') {
|
||||||
warnx("Cannot get home directory");
|
warnx("Cannot get home directory");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user