From 1a81a24b1dbdcdc299e5b817d309fcae692019a3 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sat, 20 Aug 2022 12:07:04 +0300 Subject: lpass: drop unnecessary variable --- src/lpass.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lpass.c b/src/lpass.c index 70b4b80..c6a42cf 100644 --- a/src/lpass.c +++ b/src/lpass.c @@ -61,15 +61,14 @@ static struct cmd_struct *get_cmd(const char *name) static int goto_maindir() { - int result; char *rootdir = xstrcat(getenv("HOME"), LOCKPASS_DIR, "/"); int retval = chdir(rootdir); if(retval) // failed { if(errno == ENOENT) { // create main directory: - result = mkdir(rootdir, S_IRWXU); - if(result && errno != EEXIST) { + retval = mkdir(rootdir, S_IRWXU); + if(retval && errno != EEXIST) { print_error("Error: %s\n", strerror(errno)); } else { // try again: retval = chdir(rootdir); -- cgit v1.2.3-18-g5258