aboutsummaryrefslogtreecommitdiffstats
path: root/src/satd-diminished.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-29 18:07:47 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-29 18:08:04 +0100
commitb168b5cadca0a64a5c820eb4a47d0031c58ac29a (patch)
treeee2ef542e625212c9f1379993d2410c48f54179e /src/satd-diminished.c
parentm + satd-diminished: split out spawn from main (diff)
downloadsat-b168b5cadca0a64a5c820eb4a47d0031c58ac29a.tar.gz
sat-b168b5cadca0a64a5c820eb4a47d0031c58ac29a.tar.bz2
sat-b168b5cadca0a64a5c820eb4a47d0031c58ac29a.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/satd-diminished.c')
-rw-r--r--src/satd-diminished.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/satd-diminished.c b/src/satd-diminished.c
index fa3b2e5..4316e22 100644
--- a/src/satd-diminished.c
+++ b/src/satd-diminished.c
@@ -149,20 +149,18 @@ accept_again:
close(fd), fd = -1;
goto accept_again;
+fail:
+ perror(argv[0]);
+ if (fd >= 0)
+ close(fd);
+ rc = 1;
done:
unlink(argv[1]);
if (!rc)
unlink(argv[2]);
close(SOCK_FILENO);
close(STATE_FILENO);
- return 0;
-
-fail:
- perror(argv[0]);
- if (fd >= 0)
- close(fd);
- rc = 1;
- goto done;
+ return rc;
(void) argc;
}