summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_main.c2
-rw-r--r--bgpd/bgp_packet.c2
-rw-r--r--bgpd/bgp_routemap.c2
-rw-r--r--bgpd/bgp_updgrp.c2
-rw-r--r--eigrpd/eigrp_main.c2
-rw-r--r--lib/csv.c18
-rw-r--r--lib/imsg-buffer.c34
-rw-r--r--lib/imsg.c40
-rw-r--r--lib/openbsd-tree.c4
-rw-r--r--lib/printf/printf-pos.c36
-rw-r--r--lib/printf/vfprintf.c6
-rw-r--r--lib/ptm_lib.c20
-rw-r--r--lib/routemap.c2
-rw-r--r--lib/typerb.c2
-rw-r--r--ospf6d/ospf6_area.c2
-rw-r--r--ospf6d/ospf6_intra.c14
-rw-r--r--ospf6d/ospf6_route.c2
-rw-r--r--ospfd/ospf_main.c2
-rw-r--r--ripd/rip_main.c2
-rw-r--r--vtysh/vtysh.c4
-rw-r--r--vtysh/vtysh_config.c2
-rw-r--r--vtysh/vtysh_main.c2
-rw-r--r--zebra/redistribute.c4
-rw-r--r--zebra/zebra_mpls_openbsd.c2
-rw-r--r--zebra/zebra_ptm.c6
-rw-r--r--zebra/zebra_routemap.c2
26 files changed, 108 insertions, 108 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index 898c35e4ef..3499fc4056 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -491,5 +491,5 @@ int main(int argc, char **argv)
frr_run(bm->master);
/* Not reached. */
- return (0);
+ return 0;
}
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 02f0ecf2fd..ef87876a17 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -973,7 +973,7 @@ static int bgp_collision_detect(struct peer *new, struct in_addr remote_id)
if (peer->status == Established || peer->status == Clearing) {
bgp_notify_send(new, BGP_NOTIFY_CEASE,
BGP_NOTIFY_CEASE_COLLISION_RESOLUTION);
- return (-1);
+ return -1;
} else if ((peer->status == OpenConfirm)
|| (peer->status == OpenSent)) {
/* 1. The BGP Identifier of the local system is compared
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index ecd770a1d1..34a135d51d 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -3706,7 +3706,7 @@ int bgp_route_map_update_timer(struct thread *thread)
route_map_walk_update_list(bgp_route_map_process_update_cb);
- return (0);
+ return 0;
}
static void bgp_route_map_mark_update(const char *rmap_name)
diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c
index 3dbc675212..50824cd6dd 100644
--- a/bgpd/bgp_updgrp.c
+++ b/bgpd/bgp_updgrp.c
@@ -1780,7 +1780,7 @@ int update_group_refresh_default_originate_route_map(struct thread *thread)
THREAD_TIMER_OFF(bgp->t_rmap_def_originate_eval);
bgp_unlock(bgp);
- return (0);
+ return 0;
}
/*
diff --git a/eigrpd/eigrp_main.c b/eigrpd/eigrp_main.c
index 0746b04edb..d286a4f100 100644
--- a/eigrpd/eigrp_main.c
+++ b/eigrpd/eigrp_main.c
@@ -228,5 +228,5 @@ int main(int argc, char **argv, char **envp)
frr_run(master);
/* Not reached. */
- return (0);
+ return 0;
}
diff --git a/lib/csv.c b/lib/csv.c
index 582106ebd4..445742807c 100644
--- a/lib/csv.c
+++ b/lib/csv.c
@@ -83,7 +83,7 @@ csv_t *csv_init(csv_t *csv, char *buf, int buflen)
csv = malloc(sizeof(csv_t));
if (csv == NULL) {
log_error("CSV Malloc failed\n");
- return (NULL);
+ return NULL;
}
}
memset(csv, 0, sizeof(csv_t));
@@ -144,7 +144,7 @@ char *csv_field_iter_next(csv_field_t **fld)
{
*fld = TAILQ_NEXT(*fld, next_field);
if ((*fld) == NULL) {
- return (NULL);
+ return NULL;
}
return ((*fld)->field);
}
@@ -198,7 +198,7 @@ static csv_field_t *csv_add_field_to_record(csv_t *csv, csv_record_t *rec,
if (!fld) {
log_error("field malloc failed\n");
/* more cleanup needed */
- return (NULL);
+ return NULL;
}
TAILQ_INSERT_TAIL(&(rec->fields), fld, next_field);
fld->field = str + rlen;
@@ -227,7 +227,7 @@ csv_record_t *csv_encode(csv_t *csv, int count, ...)
str = (char *)malloc(csv->buflen);
if (!str) {
log_error("field str malloc failed\n");
- return (NULL);
+ return NULL;
}
}
@@ -238,7 +238,7 @@ csv_record_t *csv_encode(csv_t *csv, int count, ...)
if (!buf)
free(str);
va_end(list);
- return (NULL);
+ return NULL;
}
csv_init_record(rec);
rec->record = str;
@@ -255,7 +255,7 @@ csv_record_t *csv_encode(csv_t *csv, int count, ...)
log_error("fld malloc failed\n");
csv_remove_record(csv, rec);
va_end(list);
- return (NULL);
+ return NULL;
}
if (tempc < (count - 1)) {
rec->rec_len += snprintf((str + rec->rec_len),
@@ -494,21 +494,21 @@ csv_record_t *csv_concat_record(csv_t *csv, csv_record_t *rec1,
if (!csv_is_record_valid(csv, rec1)
|| !csv_is_record_valid(csv, rec2)) {
log_error("rec1 and/or rec2 invalid\n");
- return (NULL);
+ return NULL;
}
/* we can only concat records if no buf was supplied during csv init */
if (csv->buf) {
log_error(
"un-supported for this csv type - single buf detected\n");
- return (NULL);
+ return NULL;
}
/* create a new rec */
rec = calloc(1, sizeof(csv_record_t));
if (!rec) {
log_error("record malloc failed\n");
- return (NULL);
+ return NULL;
}
csv_init_record(rec);
diff --git a/lib/imsg-buffer.c b/lib/imsg-buffer.c
index c2f4052b8f..4d41702707 100644
--- a/lib/imsg-buffer.c
+++ b/lib/imsg-buffer.c
@@ -30,10 +30,10 @@ struct ibuf *ibuf_open(size_t len)
struct ibuf *buf;
if ((buf = calloc(1, sizeof(struct ibuf))) == NULL)
- return (NULL);
+ return NULL;
if ((buf->buf = malloc(len)) == NULL) {
free(buf);
- return (NULL);
+ return NULL;
}
buf->size = buf->max = len;
buf->fd = -1;
@@ -46,10 +46,10 @@ struct ibuf *ibuf_dynamic(size_t len, size_t max)
struct ibuf *buf;
if (max < len)
- return (NULL);
+ return NULL;
if ((buf = ibuf_open(len)) == NULL)
- return (NULL);
+ return NULL;
if (max > 0)
buf->max = max;
@@ -64,27 +64,27 @@ static int ibuf_realloc(struct ibuf *buf, size_t len)
/* on static buffers max is eq size and so the following fails */
if (buf->wpos + len > buf->max) {
errno = ERANGE;
- return (-1);
+ return -1;
}
b = realloc(buf->buf, buf->wpos + len);
if (b == NULL)
- return (-1);
+ return -1;
buf->buf = b;
buf->size = buf->wpos + len;
- return (0);
+ return 0;
}
int ibuf_add(struct ibuf *buf, const void *data, size_t len)
{
if (buf->wpos + len > buf->size)
if (ibuf_realloc(buf, len) == -1)
- return (-1);
+ return -1;
memcpy(buf->buf + buf->wpos, data, len);
buf->wpos += len;
- return (0);
+ return 0;
}
void *ibuf_reserve(struct ibuf *buf, size_t len)
@@ -93,7 +93,7 @@ void *ibuf_reserve(struct ibuf *buf, size_t len)
if (buf->wpos + len > buf->size)
if (ibuf_realloc(buf, len) == -1)
- return (NULL);
+ return NULL;
b = buf->buf + buf->wpos;
buf->wpos += len;
@@ -104,7 +104,7 @@ void *ibuf_seek(struct ibuf *buf, size_t pos, size_t len)
{
/* only allowed to seek in already written parts */
if (pos + len > buf->wpos)
- return (NULL);
+ return NULL;
return (buf->buf + pos);
}
@@ -146,17 +146,17 @@ again:
goto again;
if (errno == ENOBUFS)
errno = EAGAIN;
- return (-1);
+ return -1;
}
if (n == 0) { /* connection closed */
errno = 0;
- return (0);
+ return 0;
}
msgbuf_drain(msgbuf, n);
- return (1);
+ return 1;
}
void ibuf_free(struct ibuf *buf)
@@ -246,12 +246,12 @@ again:
goto again;
if (errno == ENOBUFS)
errno = EAGAIN;
- return (-1);
+ return -1;
}
if (n == 0) { /* connection closed */
errno = 0;
- return (0);
+ return 0;
}
/*
@@ -265,7 +265,7 @@ again:
msgbuf_drain(msgbuf, n);
- return (1);
+ return 1;
}
static void ibuf_enqueue(struct msgbuf *msgbuf, struct ibuf *buf)
diff --git a/lib/imsg.c b/lib/imsg.c
index f07c56f0a6..b46d5cbc24 100644
--- a/lib/imsg.c
+++ b/lib/imsg.c
@@ -37,7 +37,7 @@ static int available_fds(unsigned int n)
int ret, fds[256];
if (n > (unsigned int)array_size(fds))
- return (1);
+ return 1;
ret = 0;
for (i = 0; i < n; i++) {
@@ -93,7 +93,7 @@ ssize_t imsg_read(struct imsgbuf *ibuf)
msg.msg_controllen = sizeof(cmsgbuf.buf);
if ((ifd = calloc(1, sizeof(struct imsg_fd))) == NULL)
- return (-1);
+ return -1;
again:
#ifdef __OpenBSD__
@@ -108,7 +108,7 @@ again:
#endif
errno = EAGAIN;
free(ifd);
- return (-1);
+ return -1;
}
n = recvmsg(ibuf->fd, &msg, 0);
@@ -161,21 +161,21 @@ ssize_t imsg_get(struct imsgbuf *ibuf, struct imsg *imsg)
av = ibuf->r.wpos;
if (IMSG_HEADER_SIZE > av)
- return (0);
+ return 0;
memcpy(&imsg->hdr, ibuf->r.buf, sizeof(imsg->hdr));
if (imsg->hdr.len < IMSG_HEADER_SIZE || imsg->hdr.len > MAX_IMSGSIZE) {
errno = ERANGE;
- return (-1);
+ return -1;
}
if (imsg->hdr.len > av)
- return (0);
+ return 0;
datalen = imsg->hdr.len - IMSG_HEADER_SIZE;
ibuf->r.rptr = ibuf->r.buf + IMSG_HEADER_SIZE;
if (datalen == 0)
imsg->data = NULL;
else if ((imsg->data = malloc(datalen)) == NULL)
- return (-1);
+ return -1;
if (imsg->hdr.flags & IMSGF_HASFD)
imsg->fd = imsg_get_fd(ibuf);
@@ -201,16 +201,16 @@ int imsg_compose(struct imsgbuf *ibuf, uint32_t type, uint32_t peerid,
struct ibuf *wbuf;
if ((wbuf = imsg_create(ibuf, type, peerid, pid, datalen)) == NULL)
- return (-1);
+ return -1;
if (imsg_add(wbuf, data, datalen) == -1)
- return (-1);
+ return -1;
wbuf->fd = fd;
imsg_close(ibuf, wbuf);
- return (1);
+ return 1;
}
int imsg_composev(struct imsgbuf *ibuf, uint32_t type, uint32_t peerid,
@@ -223,17 +223,17 @@ int imsg_composev(struct imsgbuf *ibuf, uint32_t type, uint32_t peerid,
datalen += iov[i].iov_len;
if ((wbuf = imsg_create(ibuf, type, peerid, pid, datalen)) == NULL)
- return (-1);
+ return -1;
for (i = 0; i < iovcnt; i++)
if (imsg_add(wbuf, iov[i].iov_base, iov[i].iov_len) == -1)
- return (-1);
+ return -1;
wbuf->fd = fd;
imsg_close(ibuf, wbuf);
- return (1);
+ return 1;
}
/* ARGSUSED */
@@ -248,7 +248,7 @@ struct ibuf *imsg_create(struct imsgbuf *ibuf, uint32_t type, uint32_t peerid,
datalen += IMSG_HEADER_SIZE;
if (datalen > MAX_IMSGSIZE) {
errno = ERANGE;
- return (NULL);
+ return NULL;
}
hdr.type = type;
@@ -257,10 +257,10 @@ struct ibuf *imsg_create(struct imsgbuf *ibuf, uint32_t type, uint32_t peerid,
if ((hdr.pid = pid) == 0)
hdr.pid = ibuf->pid;
if ((wbuf = ibuf_dynamic(datalen, MAX_IMSGSIZE)) == NULL) {
- return (NULL);
+ return NULL;
}
if (imsg_add(wbuf, &hdr, sizeof(hdr)) == -1)
- return (NULL);
+ return NULL;
return (wbuf);
}
@@ -270,7 +270,7 @@ int imsg_add(struct ibuf *msg, const void *data, uint16_t datalen)
if (datalen)
if (ibuf_add(msg, data, datalen) == -1) {
ibuf_free(msg);
- return (-1);
+ return -1;
}
return (datalen);
}
@@ -301,7 +301,7 @@ int imsg_get_fd(struct imsgbuf *ibuf)
struct imsg_fd *ifd;
if ((ifd = TAILQ_POP_FIRST(&ibuf->fds, entry)) == NULL)
- return (-1);
+ return -1;
fd = ifd->fd;
free(ifd);
@@ -313,8 +313,8 @@ int imsg_flush(struct imsgbuf *ibuf)
{
while (ibuf->w.queued)
if (msgbuf_write(&ibuf->w) <= 0)
- return (-1);
- return (0);
+ return -1;
+ return 0;
}
void imsg_clear(struct imsgbuf *ibuf)
diff --git a/lib/openbsd-tree.c b/lib/openbsd-tree.c
index ddcc59fa8f..98d2e155e3 100644
--- a/lib/openbsd-tree.c
+++ b/lib/openbsd-tree.c
@@ -431,7 +431,7 @@ void *_rb_insert(const struct rb_type *t, struct rbt_tree *rbt, void *elm)
rbe_insert_color(t, rbt, rbe);
- return (NULL);
+ return NULL;
}
/* Finds the node with the same key as elm */
@@ -453,7 +453,7 @@ void *_rb_find(const struct rb_type *t, const struct rbt_tree *rbt,
return (node);
}
- return (NULL);
+ return NULL;
}
/* Finds the first node greater than or equal to the search key */
diff --git a/lib/printf/printf-pos.c b/lib/printf/printf-pos.c
index 45e4f86229..20a58eacdc 100644
--- a/lib/printf/printf-pos.c
+++ b/lib/printf/printf-pos.c
@@ -125,11 +125,11 @@ _ensurespace(struct typetable *types)
if (types->nextarg >= types->tablesize) {
if (__grow_type_table(types))
- return (-1);
+ return -1;
}
if (types->nextarg > types->tablemax)
types->tablemax = types->nextarg;
- return (0);
+ return 0;
}
/*
@@ -141,9 +141,9 @@ addtype(struct typetable *types, enum typeid type)
{
if (_ensurespace(types))
- return (-1);
+ return -1;
types->table[types->nextarg++] = type;
- return (0);
+ return 0;
}
static inline int
@@ -151,7 +151,7 @@ addsarg(struct typetable *types, int flags)
{
if (_ensurespace(types))
- return (-1);
+ return -1;
if (flags & LONGDBL)
types->table[types->nextarg++] = T_INT64T;
else if (flags & INTMAXT)
@@ -166,7 +166,7 @@ addsarg(struct typetable *types, int flags)
types->table[types->nextarg++] = T_LONG;
else
types->table[types->nextarg++] = T_INT;
- return (0);
+ return 0;
}
static inline int
@@ -174,7 +174,7 @@ adduarg(struct typetable *types, int flags)
{
if (_ensurespace(types))
- return (-1);
+ return -1;
if (flags & LONGDBL)
types->table[types->nextarg++] = T_UINT64T;
else if (flags & INTMAXT)
@@ -189,7 +189,7 @@ adduarg(struct typetable *types, int flags)
types->table[types->nextarg++] = T_U_LONG;
else
types->table[types->nextarg++] = T_U_INT;
- return (0);
+ return 0;
}
/*
@@ -211,14 +211,14 @@ addaster(struct typetable *types, char **fmtp)
u_int hold = types->nextarg;
types->nextarg = n2;
if (addtype(types, T_INT))
- return (-1);
+ return -1;
types->nextarg = hold;
*fmtp = ++cp;
} else {
if (addtype(types, T_INT))
- return (-1);
+ return -1;
}
- return (0);
+ return 0;
}
#ifdef WCHAR_SUPPORT
@@ -238,14 +238,14 @@ addwaster(struct typetable *types, wchar_t **fmtp)
u_int hold = types->nextarg;
types->nextarg = n2;
if (addtype(types, T_INT))
- return (-1);
+ return -1;
types->nextarg = hold;
*fmtp = ++cp;
} else {
if (addtype(types, T_INT))
- return (-1);
+ return -1;
}
- return (0);
+ return 0;
}
#endif /* WCHAR_SUPPORT */
@@ -652,19 +652,19 @@ __grow_type_table(struct typetable *types)
/* Detect overflow */
if (types->nextarg > MAX_POSARG)
- return (-1);
+ return -1;
newsize = oldsize * 2;
if (newsize < types->nextarg + 1)
newsize = types->nextarg + 1;
if (oldsize == STATIC_ARG_TBL_SIZE) {
if ((newtable = malloc(newsize * sizeof(enum typeid))) == NULL)
- return (-1);
+ return -1;
bcopy(oldtable, newtable, oldsize * sizeof(enum typeid));
} else {
newtable = realloc(oldtable, newsize * sizeof(enum typeid));
if (newtable == NULL)
- return (-1);
+ return -1;
}
for (n = oldsize; n < newsize; n++)
newtable[n] = T_UNUSED;
@@ -672,7 +672,7 @@ __grow_type_table(struct typetable *types)
types->table = newtable;
types->tablesize = newsize;
- return (0);
+ return 0;
}
/*
diff --git a/lib/printf/vfprintf.c b/lib/printf/vfprintf.c
index 07df6dd8fe..6ffccb3811 100644
--- a/lib/printf/vfprintf.c
+++ b/lib/printf/vfprintf.c
@@ -94,7 +94,7 @@ __wcsconv(wchar_t *wcsarg, int prec)
mbs = initial;
nbytes = wcsrtombs(NULL, (const wchar_t **)&p, 0, &mbs);
if (nbytes == (size_t)-1)
- return (NULL);
+ return NULL;
} else {
/*
* Optimisation: if the output precision is small enough,
@@ -117,7 +117,7 @@ __wcsconv(wchar_t *wcsarg, int prec)
}
}
if ((convbuf = malloc(nbytes + 1)) == NULL)
- return (NULL);
+ return NULL;
/* Fill the output buffer. */
p = wcsarg;
@@ -125,7 +125,7 @@ __wcsconv(wchar_t *wcsarg, int prec)
if ((nbytes = wcsrtombs(convbuf, (const wchar_t **)&p,
nbytes, &mbs)) == (size_t)-1) {
free(convbuf);
- return (NULL);
+ return NULL;
}
convbuf[nbytes] = '\0';
return (convbuf);
diff --git a/lib/ptm_lib.c b/lib/ptm_lib.c
index a2ce9a0e2f..54f027deeb 100644
--- a/lib/ptm_lib.c
+++ b/lib/ptm_lib.c
@@ -92,36 +92,36 @@ static int _ptm_lib_decode_header(csv_t *csv, int *msglen, int *version,
rec = csv_record_iter(csv);
if (rec == NULL) {
DLOG("malformed CSV\n");
- return (-1);
+ return -1;
}
hdr = csv_field_iter(rec, &fld);
if (hdr == NULL) {
DLOG("malformed CSV\n");
- return (-1);
+ return -1;
}
*msglen = atoi(hdr);
hdr = csv_field_iter_next(&fld);
if (hdr == NULL) {
DLOG("malformed CSV\n");
- return (-1);
+ return -1;
}
*version = atoi(hdr);
hdr = csv_field_iter_next(&fld);
if (hdr == NULL) {
DLOG("malformed CSV\n");
- return (-1);
+ return -1;
}
*type = atoi(hdr);
hdr = csv_field_iter_next(&fld);
if (hdr == NULL) {
DLOG("malformed CSV\n");
- return (-1);
+ return -1;
}
*cmd_id = atoi(hdr);
hdr = csv_field_iter_next(&fld);
if (hdr == NULL) {
DLOG("malformed CSV\n");
- return (-1);
+ return -1;
}
/* remove leading spaces */
for (i = j = 0; i < csv_field_len(fld); i++) {
@@ -132,7 +132,7 @@ static int _ptm_lib_decode_header(csv_t *csv, int *msglen, int *version,
}
client_name[j] = '\0';
- return (0);
+ return 0;
}
int ptm_lib_append_msg(ptm_lib_handle_t *hdl, void *ctxt, const char *key,
@@ -364,7 +364,7 @@ int ptm_lib_process_msg(ptm_lib_handle_t *hdl, int fd, char *inbuf, int inlen,
if (!csv) {
DLOG("Cannot allocate csv for hdr\n");
- return (-1);
+ return -1;
}
rc = _ptm_lib_decode_header(csv, &msglen, &ver, &type, &cmd_id,
@@ -390,14 +390,14 @@ int ptm_lib_process_msg(ptm_lib_handle_t *hdl, int fd, char *inbuf, int inlen,
/* we only support the get-status cmd */
if (strcmp(inbuf, PTMLIB_CMD_GET_STATUS)) {
DLOG("unsupported legacy cmd %s\n", inbuf);
- return (-1);
+ return -1;
}
/* internally create a csv-style cmd */
ptm_lib_init_msg(hdl, 0, PTMLIB_MSG_TYPE_CMD, NULL,
(void *)&p_ctxt);
if (!p_ctxt) {
DLOG("couldnt allocate context\n");
- return (-1);
+ return -1;
}
ptm_lib_append_msg(hdl, p_ctxt, "cmd", PTMLIB_CMD_GET_STATUS);
diff --git a/lib/routemap.c b/lib/routemap.c
index 9771288a65..4a7243f8a8 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -1335,7 +1335,7 @@ const char *route_map_get_match_arg(struct route_map_index *index,
if (rule->cmd == cmd && rule->rule_str != NULL)
return (rule->rule_str);
- return (NULL);
+ return NULL;
}
static route_map_event_t get_route_map_delete_event(route_map_event_t type)
diff --git a/lib/typerb.c b/lib/typerb.c
index 3886fc678e..7e8cd9d8f7 100644
--- a/lib/typerb.c
+++ b/lib/typerb.c
@@ -395,7 +395,7 @@ struct rb_entry *typed_rb_find(struct rbt_tree *rbt, const struct rb_entry *key,
return tmp;
}
- return (NULL);
+ return NULL;
}
struct rb_entry *typed_rb_find_gteq(struct rbt_tree *rbt,
diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c
index 484e5adae6..e4c4d4ad9c 100644
--- a/ospf6d/ospf6_area.c
+++ b/ospf6d/ospf6_area.c
@@ -157,7 +157,7 @@ static int ospf6_area_stub_set(struct ospf6 *ospf6, struct ospf6_area *area)
ospf6_area_stub_update(area);
}
- return (1);
+ return 1;
}
static void ospf6_area_stub_unset(struct ospf6 *ospf6, struct ospf6_area *area)
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c
index 0fde997a20..61879b2cbb 100644
--- a/ospf6d/ospf6_intra.c
+++ b/ospf6d/ospf6_intra.c
@@ -172,13 +172,13 @@ int ospf6_router_is_stub_router(struct ospf6_lsa *lsa)
+ sizeof(struct ospf6_lsa_header));
if (!OSPF6_OPT_ISSET(rtr_lsa->options, OSPF6_OPT_R)) {
- return (OSPF6_IS_STUB_ROUTER);
+ return OSPF6_IS_STUB_ROUTER;
} else if (!OSPF6_OPT_ISSET(rtr_lsa->options, OSPF6_OPT_V6)) {
- return (OSPF6_IS_STUB_ROUTER_V6);
+ return OSPF6_IS_STUB_ROUTER_V6;
}
}
- return (OSPF6_NOT_STUB_ROUTER);
+ return OSPF6_NOT_STUB_ROUTER;
}
int ospf6_router_lsa_originate(struct thread *thread)
@@ -596,7 +596,7 @@ static char *ospf6_link_lsa_get_prefix_str(struct ospf6_lsa *lsa, char *buf,
prefixnum = ntohl(link_lsa->prefix_num);
if (pos > prefixnum)
- return (NULL);
+ return NULL;
start = (char *)link_lsa + sizeof(struct ospf6_link_lsa);
end = (char *)lsa->header + ntohs(lsa->header->length);
@@ -606,7 +606,7 @@ static char *ospf6_link_lsa_get_prefix_str(struct ospf6_lsa *lsa, char *buf,
prefix = (struct ospf6_prefix *)current;
if (prefix->prefix_length == 0
|| current + OSPF6_PREFIX_SIZE(prefix) > end) {
- return (NULL);
+ return NULL;
}
if (cnt < pos) {
@@ -623,7 +623,7 @@ static char *ospf6_link_lsa_get_prefix_str(struct ospf6_lsa *lsa, char *buf,
}
} while (current <= end);
}
- return (NULL);
+ return NULL;
}
static int ospf6_link_lsa_show(struct vty *vty, struct ospf6_lsa *lsa)
@@ -797,7 +797,7 @@ static char *ospf6_intra_prefix_lsa_get_prefix_str(struct ospf6_lsa *lsa,
prefixnum = ntohs(intra_prefix_lsa->prefix_num);
if (pos > prefixnum)
- return (NULL);
+ return NULL;
start = (char *)intra_prefix_lsa
+ sizeof(struct ospf6_intra_prefix_lsa);
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c
index 28b15769d7..723746c471 100644
--- a/ospf6d/ospf6_route.c
+++ b/ospf6d/ospf6_route.c
@@ -336,7 +336,7 @@ int ospf6_route_get_first_nh_index(struct ospf6_route *route)
return nh->ifindex;
}
- return (-1);
+ return -1;
}
int ospf6_nexthop_cmp(struct ospf6_nexthop *a, struct ospf6_nexthop *b)
diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c
index d02ffe0448..9ce6877035 100644
--- a/ospfd/ospf_main.c
+++ b/ospfd/ospf_main.c
@@ -221,5 +221,5 @@ int main(int argc, char **argv)
frr_run(master);
/* Not reached. */
- return (0);
+ return 0;
}
diff --git a/ripd/rip_main.c b/ripd/rip_main.c
index 060bb76585..23ac07a759 100644
--- a/ripd/rip_main.c
+++ b/ripd/rip_main.c
@@ -178,5 +178,5 @@ int main(int argc, char **argv)
frr_run(master);
/* Not reached. */
- return (0);
+ return 0;
}
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 3a46835d1a..225524c67e 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -704,7 +704,7 @@ int vtysh_mark_file(const char *filename)
if (confp == NULL) {
fprintf(stderr, "%% Can't open config file %s due to '%s'.\n",
filename, safe_strerror(errno));
- return (CMD_ERR_NO_FILE);
+ return CMD_ERR_NO_FILE;
}
vty = vty_new();
@@ -885,7 +885,7 @@ int vtysh_mark_file(const char *filename)
if (confp != stdin)
fclose(confp);
- return (0);
+ return 0;
}
/* Configration make from file. */
diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c
index 27f4b0834d..9b1f0208e0 100644
--- a/vtysh/vtysh_config.c
+++ b/vtysh/vtysh_config.c
@@ -520,7 +520,7 @@ int vtysh_read_config(const char *config_default_dir)
fprintf(stderr,
"%% Can't open configuration file %s due to '%s'.\n",
config_default_dir, safe_strerror(errno));
- return (CMD_ERR_NO_FILE);
+ return CMD_ERR_NO_FILE;
}
ret = vtysh_read_file(confp);
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c
index 0ba1b9d9c8..5951274257 100644
--- a/vtysh/vtysh_main.c
+++ b/vtysh/vtysh_main.c
@@ -470,7 +470,7 @@ int main(int argc, char **argv, char **env)
if (!inputfile) {
fprintf(stderr,
"-f option MUST be specified with -m option\n");
- return (1);
+ return 1;
}
return (vtysh_mark_file(inputfile));
}
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index 6aa52bcb61..b891fb121f 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -717,10 +717,10 @@ int zebra_import_table(afi_t afi, vrf_id_t vrf_id, uint32_t table_id,
if (!is_zebra_valid_kernel_table(table_id)
|| (table_id == RT_TABLE_MAIN))
- return (-1);
+ return -1;
if (afi >= AFI_MAX)
- return (-1);
+ return -1;
table = zebra_vrf_get_table_with_table_id(afi, SAFI_UNICAST, vrf_id,
table_id);
diff --git a/zebra/zebra_mpls_openbsd.c b/zebra/zebra_mpls_openbsd.c
index fcd476dc2c..5e18414985 100644
--- a/zebra/zebra_mpls_openbsd.c
+++ b/zebra/zebra_mpls_openbsd.c
@@ -302,7 +302,7 @@ static int kernel_lsp_cmd(struct zebra_dplane_ctx *ctx)
}
}
- return (0);
+ return 0;
}
enum zebra_dplane_result kernel_lsp_update(struct zebra_dplane_ctx *ctx)
diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c
index d7bbe779bd..681b4d1ab8 100644
--- a/zebra/zebra_ptm.c
+++ b/zebra/zebra_ptm.c
@@ -190,7 +190,7 @@ static int zebra_ptm_flush_messages(struct thread *thread)
ptm_cb.t_timer = NULL;
thread_add_timer(zrouter.master, zebra_ptm_connect, NULL,
ptm_cb.reconnect_time, &ptm_cb.t_timer);
- return (-1);
+ return -1;
case BUFFER_PENDING:
ptm_cb.t_write = NULL;
thread_add_write(zrouter.master, zebra_ptm_flush_messages, NULL,
@@ -200,7 +200,7 @@ static int zebra_ptm_flush_messages(struct thread *thread)
break;
}
- return (0);
+ return 0;
}
static int zebra_ptm_send_message(char *data, int size)
@@ -661,7 +661,7 @@ int zebra_ptm_sock_read(struct thread *thread)
thread_add_timer(zrouter.master, zebra_ptm_connect, NULL,
ptm_cb.reconnect_time,
&ptm_cb.t_timer);
- return (-1);
+ return -1;
}
ptm_cb.t_read = NULL;
diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c
index 641fc8799c..2963d83828 100644
--- a/zebra/zebra_routemap.c
+++ b/zebra/zebra_routemap.c
@@ -1779,7 +1779,7 @@ static int zebra_route_map_update_timer(struct thread *thread)
* 1) VRF Aware <sigh>
* 2) Route-map aware
*/
- return (0);
+ return 0;
}
static void zebra_route_map_set_delay_timer(uint32_t value)