diff options
author | Joursoir <chat@joursoir.net> | 2022-08-20 12:07:04 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2022-08-22 00:13:43 +0300 |
commit | 1a81a24b1dbdcdc299e5b817d309fcae692019a3 (patch) | |
tree | 940fff46738ae0ab5d09bcc57516d07018f5cc1b | |
parent | 228bb9aee22326333e5dfa3e3f522f87f85e84e9 (diff) | |
download | lock-password-1a81a24b1dbdcdc299e5b817d309fcae692019a3.tar.gz lock-password-1a81a24b1dbdcdc299e5b817d309fcae692019a3.tar.bz2 lock-password-1a81a24b1dbdcdc299e5b817d309fcae692019a3.zip |
lpass: drop unnecessary variable
-rw-r--r-- | src/lpass.c | 5 |
1 files changed, 2 insertions, 3 deletions
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); |