]> git.puffer.fish Git - matthieu/frr.git/commitdiff
*: Remove parenthesis on return for constants
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Sun, 9 Feb 2020 12:21:56 +0000 (14:21 +0200)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Sun, 9 Feb 2020 12:21:56 +0000 (14:21 +0200)
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
26 files changed:
bgpd/bgp_main.c
bgpd/bgp_packet.c
bgpd/bgp_routemap.c
bgpd/bgp_updgrp.c
eigrpd/eigrp_main.c
lib/csv.c
lib/imsg-buffer.c
lib/imsg.c
lib/openbsd-tree.c
lib/printf/printf-pos.c
lib/printf/vfprintf.c
lib/ptm_lib.c
lib/routemap.c
lib/typerb.c
ospf6d/ospf6_area.c
ospf6d/ospf6_intra.c
ospf6d/ospf6_route.c
ospfd/ospf_main.c
ripd/rip_main.c
vtysh/vtysh.c
vtysh/vtysh_config.c
vtysh/vtysh_main.c
zebra/redistribute.c
zebra/zebra_mpls_openbsd.c
zebra/zebra_ptm.c
zebra/zebra_routemap.c

index 898c35e4ef3f6551119868efbfab42198c028a26..3499fc4056c5fc6e5a1cc9f7751a8e6868927d83 100644 (file)
@@ -491,5 +491,5 @@ int main(int argc, char **argv)
        frr_run(bm->master);
 
        /* Not reached. */
-       return (0);
+       return 0;
 }
index 02f0ecf2fd9bf1bf79b6e2158ca91a0583d43b4a..ef87876a17b4b32936533a16c67b01266e5b5e87 100644 (file)
@@ -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
index ecd770a1d1dc9c90cc40df08145b21ee7440b074..34a135d51d183c6af15637d02eae55a8191fba81 100644 (file)
@@ -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)
index 3dbc67521212299b40baa42a952242bcec60b569..50824cd6dd565e5f16c9d9951faf9c12f303cf26 100644 (file)
@@ -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;
 }
 
 /*
index 0746b04edb79f0585e3766a69b9a632ddaff4b18..d286a4f10080d34966ebce62be3a78786b60e465 100644 (file)
@@ -228,5 +228,5 @@ int main(int argc, char **argv, char **envp)
        frr_run(master);
 
        /* Not reached. */
-       return (0);
+       return 0;
 }
index 582106ebd429356cf98b6ff224c0f4e89dc6501a..445742807cba4efa4043c87e9079f3e20e264a12 100644 (file)
--- 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);
 
index c2f4052b8f5ea66be9be7b5f3cfdcba19cc570a7..4d41702707cdba56cd07dd5650d719d5ed84396a 100644 (file)
@@ -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)
index f07c56f0a64500b009fe6fa9766bc1f4b51b9abf..b46d5cbc24586f6ffc7763dc4bf8e844f4f49ffe 100644 (file)
@@ -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)
index ddcc59fa8f5920d0e832a400c24128c90c46639a..98d2e155e38af38dceabd690aa673c550fdd63bb 100644 (file)
@@ -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 */
index 45e4f86229538b632a98f32bb5612b96fdcabb77..20a58eacdc2eebf250c0741ad5f281f16e11b8d4 100644 (file)
@@ -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;
 }
 
 /*
index 07df6dd8fe17591066f7887f43986f0f300b3ba9..6ffccb3811eae3ffa9500f9a684cef6a05868ffe 100644 (file)
@@ -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);
index a2ce9a0e2f3fda49e69e7c20ca16776f54da31c0..54f027deebc33800874162dad0b91a85aceeffa7 100644 (file)
@@ -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);
 
index 9771288a6507b6163e3f323121b95da339ab5f1e..4a7243f8a86cb216b8dc146177d9cbdf2f7dd339 100644 (file)
@@ -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)
index 3886fc678e33850801b987a08874ca5e2bea5319..7e8cd9d8f7a63e374c184ae41d110c224a9b4d3c 100644 (file)
@@ -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,
index 484e5adae674a3ab044629e0b346d0dad7640fa5..e4c4d4ad9c578529d38734ed4e1b35c5acaece3b 100644 (file)
@@ -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)
index 0fde997a207b9692feb2f9db6dace2e0fc39ed66..61879b2cbb4b95bad8b519b892bc1332d64155fe 100644 (file)
@@ -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);
index 28b15769d7608d0e74344eea20e60382451d1630..723746c4719f11fa8ce5f0277f2380142afac89c 100644 (file)
@@ -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)
index d02ffe0448df73ad394fd1e04c67218729d2b850..9ce6877035e4518a5d1ee5b158ce8f1edf3a0b6f 100644 (file)
@@ -221,5 +221,5 @@ int main(int argc, char **argv)
        frr_run(master);
 
        /* Not reached. */
-       return (0);
+       return 0;
 }
index 060bb76585c1aac4434a3ae4937fdd3736377b13..23ac07a759913fe58916f83b57fbb6f82e8bfd04 100644 (file)
@@ -178,5 +178,5 @@ int main(int argc, char **argv)
        frr_run(master);
 
        /* Not reached. */
-       return (0);
+       return 0;
 }
index 3a46835d1afe1f549054f6eb3cfdf142b767a51a..225524c67e0a227347406a6ecfca02e961fdddf1 100644 (file)
@@ -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. */
index 27f4b0834d00ab4c73e79ab1cc99e0980efd5f33..9b1f0208e0e7005121cc5750570d77b5b1431ff5 100644 (file)
@@ -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);
index 0ba1b9d9c8c70b23461ee5c4a36ffd52ea84a0e1..59512742572d2e2b72e67091a4b6bf55ddd838dd 100644 (file)
@@ -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));
        }
index 6aa52bcb61d8f4d8e86804975c790401a2bc3076..b891fb121fe4699f4ae53697da7347150518c53f 100644 (file)
@@ -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);
index fcd476dc2c35a26e75be8b32842ee5f253515e75..5e18414985916d3d8a6e8549fe916289e8f1ef17 100644 (file)
@@ -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)
index d7bbe779bdb15462b198f0f51a0a8b02b086794a..681b4d1ab8af69c2b7b01b39772b8dd492b83174 100644 (file)
@@ -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;
index 641fc8799cd66a0af59c5c9e74fc5de19b4d9d0b..2963d83828e72a7e92ac4bacaa4df4b4ad91d440 100644 (file)
@@ -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)