aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-28 02:57:03 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-28 02:57:03 +0100
commitd0b5feb12a5ce2a786d09811384a625590debc08 (patch)
treee892b4f2931b8aa970453894119671bcc73f27d0 /src
parentfix errors and tidy up (diff)
downloadsat-d0b5feb12a5ce2a786d09811384a625590debc08.tar.gz
sat-d0b5feb12a5ce2a786d09811384a625590debc08.tar.bz2
sat-d0b5feb12a5ce2a786d09811384a625590debc08.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src')
-rw-r--r--src/satd.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/satd.c b/src/satd.c
index ec0d205..0f7e200 100644
--- a/src/satd.c
+++ b/src/satd.c
@@ -89,15 +89,11 @@ main(int argc, char *argv[])
struct sockaddr_un address;
int sock = -1, foreground = 0;
- if (argc > 0)
- argv0 = argv[0];
- if (argc > 2)
- usage();
- if (argc == 2) {
- if (strcmp(argv[1], "-f"))
+ if (argc > 0) argv0 = argv[0];
+ if (argc > 2) usage();
+ if (argc == 2)
+ if (!(foreground = !strcmp(argv[1], "-f")))
usage();
- foreground = 1;
- }
t (foreground ? 0 : daemonise("satd", 0));