Fix warning.

This commit is contained in:
Kim Woelders 2017-02-12 16:30:12 +01:00
parent bdcb65bfce
commit e1435dab2e
1 changed files with 5 additions and 4 deletions

View File

@ -1104,6 +1104,7 @@ static void
load_actions(void)
{
char kbdb[1024], buf[1024], text[1024], command[1024];
const char *p;
char *s;
FILE *f;
int n, opt;
@ -1114,11 +1115,11 @@ load_actions(void)
/* FIXME - Should be fetched via IPC. */
s = getenv("EROOT");
if (!s)
s = DATADIR "/e16"; /* Default location */
p = getenv("EROOT");
if (!p)
p = DATADIR "/e16"; /* Default location */
snprintf(kbdb, sizeof(kbdb), "%s/config/e16keyedit.db", s);
snprintf(kbdb, sizeof(kbdb), "%s/config/e16keyedit.db", p);
f = fopen(kbdb, "r");
if (!f)