summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbenno <benno@openbsd.org>2019-12-04 23:03:05 +0000
committerbenno <benno@openbsd.org>2019-12-04 23:03:05 +0000
commit8db993cafbcb4d7a47539bd834c27603966e1c57 (patch)
treed5bb6d0b4a378b68dafd98207beae872d27d8bb6
parentreduce includes to the required minimum. (diff)
downloadwireguard-openbsd-8db993cafbcb4d7a47539bd834c27603966e1c57.tar.xz
wireguard-openbsd-8db993cafbcb4d7a47539bd834c27603966e1c57.zip
use return x; instead of return (x);, like all other files here.
ok deraadt@
-rw-r--r--usr.sbin/rpki-client/output-bgpd.c10
-rw-r--r--usr.sbin/rpki-client/output-bird.c10
-rw-r--r--usr.sbin/rpki-client/output-csv.c8
-rw-r--r--usr.sbin/rpki-client/output-json.c12
-rw-r--r--usr.sbin/rpki-client/output.c6
5 files changed, 23 insertions, 23 deletions
diff --git a/usr.sbin/rpki-client/output-bgpd.c b/usr.sbin/rpki-client/output-bgpd.c
index cad51c5c1c2..e3608e57145 100644
--- a/usr.sbin/rpki-client/output-bgpd.c
+++ b/usr.sbin/rpki-client/output-bgpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: output-bgpd.c,v 1.15 2019/12/04 12:40:17 deraadt Exp $ */
+/* $OpenBSD: output-bgpd.c,v 1.16 2019/12/04 23:03:05 benno Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -27,7 +27,7 @@ output_bgpd(FILE *out, struct vrp_tree *vrps)
struct vrp *v;
if (fprintf(out, "roa-set {\n") < 0)
- return (-1);
+ return -1;
RB_FOREACH(v, vrp_tree, vrps) {
ip_addr_print(&v->addr, v->afi, buf1, sizeof(buf1));
@@ -37,10 +37,10 @@ output_bgpd(FILE *out, struct vrp_tree *vrps)
else
buf2[0] = '\0';
if (fprintf(out, "\t%s %ssource-as %u\n", buf1, buf2, v->asid) < 0)
- return (-1);
+ return -1;
}
if (fprintf(out, "}\n") < 0)
- return (-1);
- return (0);
+ return -1;
+ return 0;
}
diff --git a/usr.sbin/rpki-client/output-bird.c b/usr.sbin/rpki-client/output-bird.c
index e7bbb801727..a15faa69164 100644
--- a/usr.sbin/rpki-client/output-bird.c
+++ b/usr.sbin/rpki-client/output-bird.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: output-bird.c,v 1.5 2019/12/04 12:40:17 deraadt Exp $ */
+/* $OpenBSD: output-bird.c,v 1.6 2019/12/04 23:03:05 benno Exp $ */
/*
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
*
@@ -28,16 +28,16 @@ output_bird(FILE *out, struct vrp_tree *vrps)
struct vrp *v;
if (fprintf(out, "roa table %s {\n", bird_tablename) < 0)
- return (-1);
+ return -1;
RB_FOREACH(v, vrp_tree, vrps) {
ip_addr_print(&v->addr, v->afi, buf, sizeof(buf));
if (fprintf(out, "\troa %s max %u as %u;\n", buf, v->maxlength,
v->asid) < 0)
- return (-1);
+ return -1;
}
if (fprintf(out, "}\n") < 0)
- return (-1);
- return (0);
+ return -1;
+ return 0;
}
diff --git a/usr.sbin/rpki-client/output-csv.c b/usr.sbin/rpki-client/output-csv.c
index f8058a0fbcd..da56e04e88d 100644
--- a/usr.sbin/rpki-client/output-csv.c
+++ b/usr.sbin/rpki-client/output-csv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: output-csv.c,v 1.5 2019/12/04 12:40:17 deraadt Exp $ */
+/* $OpenBSD: output-csv.c,v 1.6 2019/12/04 23:03:05 benno Exp $ */
/*
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
*
@@ -27,13 +27,13 @@ output_csv(FILE *out, struct vrp_tree *vrps)
struct vrp *v;
if (fprintf(out, "ASN,IP Prefix,Max Length,Trust Anchor\n") < 0)
- return (-1);
+ return -1;
RB_FOREACH(v, vrp_tree, vrps) {
ip_addr_print(&v->addr, v->afi, buf, sizeof(buf));
if (fprintf(out, "AS%u,%s,%u,%s\n", v->asid, buf, v->maxlength,
v->tal) < 0)
- return (-1);
+ return -1;
}
- return (0);
+ return 0;
}
diff --git a/usr.sbin/rpki-client/output-json.c b/usr.sbin/rpki-client/output-json.c
index ed71b1a9af8..a2ea0856eb4 100644
--- a/usr.sbin/rpki-client/output-json.c
+++ b/usr.sbin/rpki-client/output-json.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: output-json.c,v 1.5 2019/12/04 12:40:17 deraadt Exp $ */
+/* $OpenBSD: output-json.c,v 1.6 2019/12/04 23:03:05 benno Exp $ */
/*
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
*
@@ -28,14 +28,14 @@ output_json(FILE *out, struct vrp_tree *vrps)
int first = 1;
if (fprintf(out, "{\n\t\"roas\": [\n") < 0)
- return (-1);
+ return -1;
RB_FOREACH(v, vrp_tree, vrps) {
if (first)
first = 0;
else {
if (fprintf(out, ",\n") < 0)
- return (-1);
+ return -1;
}
ip_addr_print(&v->addr, v->afi, buf, sizeof(buf));
@@ -43,10 +43,10 @@ output_json(FILE *out, struct vrp_tree *vrps)
if (fprintf(out, "\t\t{ \"asn\": \"AS%u\", \"prefix\": \"%s\", "
"\"maxLength\": %u, \"ta\": \"%s\" }",
v->asid, buf, v->maxlength, v->tal) < 0)
- return (-1);
+ return -1;
}
if (fprintf(out, "\n\t]\n}\n") < 0)
- return (-1);
- return (0);
+ return -1;
+ return 0;
}
diff --git a/usr.sbin/rpki-client/output.c b/usr.sbin/rpki-client/output.c
index e5f4402a10f..0dfcc1f0fa9 100644
--- a/usr.sbin/rpki-client/output.c
+++ b/usr.sbin/rpki-client/output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: output.c,v 1.2 2019/12/04 23:01:54 benno Exp $ */
+/* $OpenBSD: output.c,v 1.3 2019/12/04 23:03:05 benno Exp $ */
/*
* Copyright (c) 2019 Theo de Raadt <deraadt@openbsd.org>
*
@@ -77,7 +77,7 @@ outputfiles(struct vrp_tree *v)
}
}
- return (rc);
+ return rc;
}
FILE *
@@ -101,7 +101,7 @@ output_createtmp(char *name)
f = fdopen(fd, "w");
if (f == NULL)
err(1, "fdopen");
- return (f);
+ return f;
}
void