diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2006-07-24 11:45:45 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2006-07-24 11:45:45 +0000 |
commit | 4ecfd7b0cfb81bfa6a3c6eca068e810c9c226e9c (patch) | |
tree | b6560965ae071667873d56225919640309769689 /sbin/isakmpd | |
parent | 3c1b5d0d99ec992fdcb5243cd845b810c0a95b51 (diff) |
Style; return is not a function. hshoexer@ ok.
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/dpd.c | 4 | ||||
-rw-r--r-- | sbin/isakmpd/math_group.c | 16 | ||||
-rw-r--r-- | sbin/isakmpd/monitor.c | 4 | ||||
-rw-r--r-- | sbin/isakmpd/util.c | 14 | ||||
-rw-r--r-- | sbin/isakmpd/vendor.c | 12 |
5 files changed, 25 insertions, 25 deletions
diff --git a/sbin/isakmpd/dpd.c b/sbin/isakmpd/dpd.c index 66a1ca2a69b..48ae10f2267 100644 --- a/sbin/isakmpd/dpd.c +++ b/sbin/isakmpd/dpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dpd.c,v 1.15 2006/06/02 19:35:55 hshoexer Exp $ */ +/* $OpenBSD: dpd.c,v 1.16 2006/07/24 11:45:44 ho Exp $ */ /* * Copyright (c) 2004 Håkan Olsson. All rights reserved. @@ -250,7 +250,7 @@ dpd_find_sa(struct sa *sa, void *v_sa) struct sa *isakmp_sa = v_sa; if (!isakmp_sa->id_i || !isakmp_sa->id_r) - return (0); + return 0; return (sa->phase == 2 && (sa->flags & SA_FLAG_READY) && memcmp(sa->id_i, isakmp_sa->id_i, sa->id_i_len) == 0 && memcmp(sa->id_r, isakmp_sa->id_r, sa->id_r_len) == 0); diff --git a/sbin/isakmpd/math_group.c b/sbin/isakmpd/math_group.c index 10268c616fd..cace9cb3022 100644 --- a/sbin/isakmpd/math_group.c +++ b/sbin/isakmpd/math_group.c @@ -1,4 +1,4 @@ -/* $OpenBSD: math_group.c,v 1.31 2006/06/02 19:35:55 hshoexer Exp $ */ +/* $OpenBSD: math_group.c,v 1.32 2006/07/24 11:45:44 ho Exp $ */ /* $EOM: math_group.c,v 1.25 2000/04/07 19:53:26 niklas Exp $ */ /* @@ -712,7 +712,7 @@ int modp_setraw(struct group *group, math_mp_t d, u_int8_t *s, int l) { if (BN_bin2bn(s, l, d) == NULL) - return (-1); + return -1; return 0; } @@ -759,13 +759,13 @@ modp_validate_public(struct group *group, math_mp_t pub_exp) * Ensure that peer does not send us <0, 0, 1, p-1 or >= p */ if (BN_cmp(pub_exp, BN_value_one()) != 1) /* pub_exp <= 1 */ - return (-1); + return -1; if ((tmp = BN_new()) == NULL) - return (-1); + return -1; if (!BN_sub(tmp, grp->p, BN_value_one()) || BN_cmp(pub_exp, tmp) != -1) { /* pub_exp > p-2 */ BN_clear_free(tmp); - return (-1); + return -1; } BN_clear_free(tmp); @@ -780,9 +780,9 @@ modp_validate_public(struct group *group, math_mp_t pub_exp) bits_set++; } if (bits_set <= 1) - return (-1); + return -1; - return (0); + return 0; } int @@ -874,5 +874,5 @@ int ec2n_validate_public(struct group *grp, ec2np_ptr p) { /* XXX: needs similar checks to modp_validate_public() */ - return (0); + return 0; } diff --git a/sbin/isakmpd/monitor.c b/sbin/isakmpd/monitor.c index 34d73b5e51f..45e062097e8 100644 --- a/sbin/isakmpd/monitor.c +++ b/sbin/isakmpd/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.65 2006/06/18 10:25:27 hshoexer Exp $ */ +/* $OpenBSD: monitor.c,v 1.66 2006/07/24 11:45:44 ho Exp $ */ /* * Copyright (c) 2003 Håkan Olsson. All rights reserved. @@ -358,7 +358,7 @@ monitor_req_readdir(const char *filename) if (err == -1) must_read(&errno, sizeof errno); - return (err); + return err; } int diff --git a/sbin/isakmpd/util.c b/sbin/isakmpd/util.c index d52762999c6..41442693747 100644 --- a/sbin/isakmpd/util.c +++ b/sbin/isakmpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.61 2006/06/02 19:35:55 hshoexer Exp $ */ +/* $OpenBSD: util.c,v 1.62 2006/07/24 11:45:44 ho Exp $ */ /* $EOM: util.c,v 1.23 2000/11/23 12:22:08 niklas Exp $ */ /* @@ -293,14 +293,14 @@ text2sockaddr(char *address, char *port, struct sockaddr **sa, sa_family_t af, } default: close(fd); - return (-1); + return -1; } rtm->rtm_addrs |= RTA_NETMASK|RTA_IFP|RTA_IFA; rtm->rtm_msglen = sizeof(*rtm) + sizeof(*sa2); if ((b = write(fd, buf, rtm->rtm_msglen)) < 0) { close(fd); - return (-1); + return -1; } pid = getpid(); @@ -308,7 +308,7 @@ text2sockaddr(char *address, char *port, struct sockaddr **sa, sa_family_t af, while ((len = read(fd, buf, sizeof(buf))) > 0) { if (len < sizeof(*rtm)) { close(fd); - return (-1); + return -1; } if (rtm->rtm_type == RTM_GET && @@ -316,7 +316,7 @@ text2sockaddr(char *address, char *port, struct sockaddr **sa, sa_family_t af, rtm->rtm_seq == seq) { if (rtm->rtm_errno) { close(fd); - return (-1); + return -1; } break; } @@ -327,12 +327,12 @@ text2sockaddr(char *address, char *port, struct sockaddr **sa, sa_family_t af, (RTA_DST|RTA_GATEWAY)) { np = if_indextoname(rtm->rtm_index, ifname); if (np == NULL) - return (-1); + return -1; } } if (getifaddrs(&ifap) != 0) - return (-1); + return -1; switch (af) { default: diff --git a/sbin/isakmpd/vendor.c b/sbin/isakmpd/vendor.c index e10ace8acee..90003e91289 100644 --- a/sbin/isakmpd/vendor.c +++ b/sbin/isakmpd/vendor.c @@ -40,7 +40,7 @@ setup_vendor_hashes(void) hash = hash_get(HASH_MD5); if (!hash) { log_print("setup_vendor_hashes: could not find MD5 hash"); - return (-1); + return -1; } for (i = 0; i < n; i++) { @@ -64,13 +64,13 @@ setup_vendor_hashes(void) LOG_DBG_BUF((LOG_EXCHANGE, 50, "setup_vendor_hashes", openbsd_vendor_cap[i].hash, hash->hashsize)); } - return (0); + return 0; errout: for (i = 0; i < n; i++) if (openbsd_vendor_cap[i].hash) free(openbsd_vendor_cap[i].hash); - return (-1); + return -1; } void @@ -91,7 +91,7 @@ add_vendor_openbsd(struct message *msg) if ((buf = calloc(buflen, sizeof(char))) == NULL) { log_error("add_vendor_payload: calloc(%lu) failed", (unsigned long)buflen); - return (-1); + return -1; } SET_ISAKMP_GEN_LENGTH(buf, buflen); @@ -100,11 +100,11 @@ add_vendor_openbsd(struct message *msg) if (message_add_payload(msg, ISAKMP_PAYLOAD_VENDOR, buf, buflen, 1)) { free(buf); - return (-1); + return -1; } } - return (0); + return 0; } void |