diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-10-24 08:00:43 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-10-24 08:00:43 +0000 |
commit | 58f7ab62864103d839a0a934bf2feadc6f2908d4 (patch) | |
tree | 25acdad8cf3e656e1456e6998835d73e142f91fa /usr.sbin/bgpd | |
parent | 37dc2de7360fdf4075f20003f8bda846d91c5aee (diff) |
seg_type is only set but never used. So remove it. Someone reported this
long time ago.
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/rde_attr.c | 8 | ||||
-rw-r--r-- | usr.sbin/bgpd/util.c | 6 |
2 files changed, 5 insertions, 9 deletions
diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c index b69ff0c534b..5aa4f02bb45 100644 --- a/usr.sbin/bgpd/rde_attr.c +++ b/usr.sbin/bgpd/rde_attr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_attr.c,v 1.94 2015/08/30 23:20:43 deraadt Exp $ */ +/* $OpenBSD: rde_attr.c,v 1.95 2015/10/24 08:00:42 claudio Exp $ */ /* * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -801,11 +801,10 @@ aspath_loopfree(struct aspath *aspath, u_int32_t myAS) { u_int8_t *seg; u_int16_t len, seg_size; - u_int8_t i, seg_len, seg_type; + u_int8_t i, seg_len; seg = aspath->data; for (len = aspath->len; len > 0; len -= seg_size, seg += seg_size) { - seg_type = seg[0]; seg_len = seg[1]; seg_size = 2 + sizeof(u_int32_t) * seg_len; @@ -939,7 +938,7 @@ aspath_lenmatch(struct aspath *a, enum aslen_spec type, u_int aslen) u_int32_t as, lastas = 0; u_int count = 0; u_int16_t len, seg_size; - u_int8_t i, seg_type, seg_len; + u_int8_t i, seg_len; if (type == ASLEN_MAX) { if (aslen < aspath_count(a->data, a->len)) @@ -951,7 +950,6 @@ aspath_lenmatch(struct aspath *a, enum aslen_spec type, u_int aslen) /* type == ASLEN_SEQ */ seg = a->data; for (len = a->len; len > 0; len -= seg_size, seg += seg_size) { - seg_type = seg[0]; seg_len = seg[1]; seg_size = 2 + sizeof(u_int32_t) * seg_len; diff --git a/usr.sbin/bgpd/util.c b/usr.sbin/bgpd/util.c index 2b5c02e9962..61af75968ae 100644 --- a/usr.sbin/bgpd/util.c +++ b/usr.sbin/bgpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.19 2014/11/11 08:02:09 claudio Exp $ */ +/* $OpenBSD: util.c,v 1.20 2015/10/24 08:00:42 claudio Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -312,7 +312,7 @@ aspath_match(void *data, u_int16_t len, enum as_spec type, u_int32_t as) u_int8_t *seg; int final; u_int16_t seg_size; - u_int8_t i, seg_type, seg_len; + u_int8_t i, seg_len; if (type == AS_EMPTY) { if (len == 0) @@ -321,10 +321,8 @@ aspath_match(void *data, u_int16_t len, enum as_spec type, u_int32_t as) return (0); } - final = 0; seg = data; for (; len > 0; len -= seg_size, seg += seg_size) { - seg_type = seg[0]; seg_len = seg[1]; seg_size = 2 + sizeof(u_int32_t) * seg_len; |