diff options
Diffstat (limited to 'net/netrom/nr_route.c')
-rw-r--r-- | net/netrom/nr_route.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index 44059d0c8dd1..cd5ddb2ebc43 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c | |||
@@ -257,9 +257,12 @@ static int __must_check nr_add_node(ax25_address *nr, const char *mnemonic, | |||
257 | case 3: | 257 | case 3: |
258 | if (nr_node->routes[1].quality > nr_node->routes[0].quality) { | 258 | if (nr_node->routes[1].quality > nr_node->routes[0].quality) { |
259 | switch (nr_node->which) { | 259 | switch (nr_node->which) { |
260 | case 0: nr_node->which = 1; break; | 260 | case 0: |
261 | case 1: nr_node->which = 0; break; | 261 | nr_node->which = 1; |
262 | default: break; | 262 | break; |
263 | case 1: | ||
264 | nr_node->which = 0; | ||
265 | break; | ||
263 | } | 266 | } |
264 | nr_route = nr_node->routes[0]; | 267 | nr_route = nr_node->routes[0]; |
265 | nr_node->routes[0] = nr_node->routes[1]; | 268 | nr_node->routes[0] = nr_node->routes[1]; |
@@ -505,12 +508,13 @@ static int nr_dec_obs(void) | |||
505 | s->count--; | 508 | s->count--; |
506 | 509 | ||
507 | switch (i) { | 510 | switch (i) { |
508 | case 0: | 511 | case 0: |
509 | s->routes[0] = s->routes[1]; | 512 | s->routes[0] = s->routes[1]; |
510 | case 1: | 513 | /* Fallthrough */ |
511 | s->routes[1] = s->routes[2]; | 514 | case 1: |
512 | case 2: | 515 | s->routes[1] = s->routes[2]; |
513 | break; | 516 | case 2: |
517 | break; | ||
514 | } | 518 | } |
515 | break; | 519 | break; |
516 | 520 | ||