tRemove err() call in favor of return in getkey() - safe - password protected secret keeper
 (HTM) git clone git://git.z3bra.org/safe.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 8b0d9811b499d09eca3f5718cd88844af2e9ecd3
 (DIR) parent cb46ec01b637619484afb68b08a3c715f86d5d6e
 (HTM) Author: Willy Goiffon <dev@z3bra.org>
       Date:   Mon,  3 Jun 2019 17:38:34 +0200
       
       Remove err() call in favor of return in getkey()
       
       Diffstat:
         M safe.c                              |       5 ++---
       
       1 file changed, 2 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/safe.c b/safe.c
       t@@ -274,12 +274,11 @@ getkey(struct safe *s, char *path)
                strcpy(addr.sun_path, path);
        
                if ((sfd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
       -                err(1, "socket %s", path);
       +                return -1;
        
                if (connect(sfd, (struct sockaddr *)&addr, sizeof(addr)) < 0)
       -                err(1, "connect %s", path);
       +                return -1;
        
       -        xwrite(sfd, s->salt, sizeof(s->salt));
                xread(sfd, s->key, sizeof(s->key), NULL);
        
                return 0;