summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-01-21 10:34:26 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-01-21 10:34:26 +0000
commit485104e2d443c36382923c3c23cc2f275e7ed81c (patch)
treee4e7c7c612fc4344f815b616686bd470374bdd29
parentafe63d21204212ddead6dafdfe20e0a6ed5c1e72 (diff)
Having a 'case 256:' in a switch (<uchar>) {} is bad on principle
and makes gcc unhappy. In-line the single use #define, eliminate the 256: case and remove a now unneeded local variable. ok guenther@
-rw-r--r--usr.sbin/mrouted/prune.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/usr.sbin/mrouted/prune.c b/usr.sbin/mrouted/prune.c
index 5d9e71a448e..e51d3de6ce8 100644
--- a/usr.sbin/mrouted/prune.c
+++ b/usr.sbin/mrouted/prune.c
@@ -23,21 +23,6 @@ extern int phys_vif;
*/
#define CACHE_LIFETIME(x) ((x) + (arc4random_uniform(x)))
-#define CHK_GS(x, y) { \
- switch(x) { \
- case 2: \
- case 4: \
- case 8: \
- case 16: \
- case 32: \
- case 64: \
- case 128: \
- case 256: y = 1; \
- break; \
- default: y = 0; \
- } \
- }
-
struct gtable *kernel_table; /* ptr to list of kernel grp entries*/
static struct gtable *kernel_no_route; /* list of grp entries w/o routes */
struct gtable *gtp; /* pointer for kernel rt entries */
@@ -1433,10 +1418,19 @@ age_table_entry(void)
/* retransmit graft if graft sent flag is still set */
if (gt->gt_grftsnt) {
- int y;
- CHK_GS(gt->gt_grftsnt++, y);
- if (y)
+ switch(gt->gt_grftsnt++) {
+ case 2:
+ case 4:
+ case 8:
+ case 16:
+ case 32:
+ case 64:
+ case 128:
send_graft(gt);
+ break;
+ default:
+ break;
+ }
}
/*