summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2021-01-08 19:38:58 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2021-01-08 19:38:58 +0100
commitd95499b2d8e777fcb82fd3637044c3e70118a06b (patch)
tree8dded02385248077e08e22739a82d268547cd8b7
parent04b832539cd5b5392c56ef238ec9b42b689de3ae (diff)
sfeed_atom: code-style: use conditional with pledge, like the other tools
-rw-r--r--sfeed_atom.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sfeed_atom.c b/sfeed_atom.c
index 2626b6c..8935db5 100644
--- a/sfeed_atom.c
+++ b/sfeed_atom.c
@@ -111,13 +111,8 @@ main(int argc, char *argv[])
char *name;
int i;
- if (argc == 1) {
- if (pledge("stdio", NULL) == -1)
- err(1, "pledge");
- } else {
- if (pledge("stdio rpath", NULL) == -1)
- err(1, "pledge");
- }
+ if (pledge(argc == 1 ? "stdio" : "stdio rpath", NULL) == -1)
+ err(1, "pledge");
if ((now = time(NULL)) == -1)
err(1, "time");