diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-28 02:57:03 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-28 02:57:03 +0100 |
commit | d0b5feb12a5ce2a786d09811384a625590debc08 (patch) | |
tree | e892b4f2931b8aa970453894119671bcc73f27d0 /src | |
parent | fix errors and tidy up (diff) | |
download | sat-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.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -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)); |