lua: stop computing len twice
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
f0af665795
commit
330f4304c0
4
lua.c
4
lua.c
|
@ -575,9 +575,9 @@ luaA_parserc(const char *confpatharg)
|
|||
|
||||
confdir = getenv("XDG_CONFIG_HOME");
|
||||
|
||||
if(a_strlen(confdir))
|
||||
if((len = a_strlen(confdir)))
|
||||
{
|
||||
len = a_strlen(confdir) + sizeof(AWESOME_CONFIG_FILE);
|
||||
len += sizeof(AWESOME_CONFIG_FILE);
|
||||
confpath = p_new(char, len);
|
||||
a_strcpy(confpath, len, confdir);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue