diff options
Diffstat (limited to 'net/tipc/name_table.c')
-rw-r--r-- | net/tipc/name_table.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index ddc2ad4c2d32..46b2f31f96a1 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c | |||
@@ -296,8 +296,8 @@ static struct publication *tipc_nameseq_insert_publ(struct name_seq *nseq, | |||
296 | 296 | ||
297 | sseq = &nseq->sseqs[inspos]; | 297 | sseq = &nseq->sseqs[inspos]; |
298 | freesseq = &nseq->sseqs[nseq->first_free]; | 298 | freesseq = &nseq->sseqs[nseq->first_free]; |
299 | memmove(sseq + 1, sseq, (freesseq - sseq) * sizeof (*sseq)); | 299 | memmove(sseq + 1, sseq, (freesseq - sseq) * sizeof(*sseq)); |
300 | memset(sseq, 0, sizeof (*sseq)); | 300 | memset(sseq, 0, sizeof(*sseq)); |
301 | nseq->first_free++; | 301 | nseq->first_free++; |
302 | sseq->lower = lower; | 302 | sseq->lower = lower; |
303 | sseq->upper = upper; | 303 | sseq->upper = upper; |
@@ -471,7 +471,7 @@ end_node: | |||
471 | 471 | ||
472 | if (!sseq->zone_list) { | 472 | if (!sseq->zone_list) { |
473 | free = &nseq->sseqs[nseq->first_free--]; | 473 | free = &nseq->sseqs[nseq->first_free--]; |
474 | memmove(sseq, sseq + 1, (free - (sseq + 1)) * sizeof (*sseq)); | 474 | memmove(sseq, sseq + 1, (free - (sseq + 1)) * sizeof(*sseq)); |
475 | removed_subseq = 1; | 475 | removed_subseq = 1; |
476 | } | 476 | } |
477 | 477 | ||
@@ -507,7 +507,7 @@ static void tipc_nameseq_subscribe(struct name_seq *nseq, struct subscription *s | |||
507 | 507 | ||
508 | while (sseq != &nseq->sseqs[nseq->first_free]) { | 508 | while (sseq != &nseq->sseqs[nseq->first_free]) { |
509 | struct publication *zl = sseq->zone_list; | 509 | struct publication *zl = sseq->zone_list; |
510 | if (zl && tipc_subscr_overlap(s,sseq->lower,sseq->upper)) { | 510 | if (zl && tipc_subscr_overlap(s, sseq->lower, sseq->upper)) { |
511 | struct publication *crs = zl; | 511 | struct publication *crs = zl; |
512 | int must_report = 1; | 512 | int must_report = 1; |
513 | 513 | ||
@@ -798,7 +798,7 @@ void tipc_nametbl_subscribe(struct subscription *s) | |||
798 | if (!seq) { | 798 | if (!seq) { |
799 | seq = tipc_nameseq_create(type, &table.types[hash(type)]); | 799 | seq = tipc_nameseq_create(type, &table.types[hash(type)]); |
800 | } | 800 | } |
801 | if (seq){ | 801 | if (seq) { |
802 | spin_lock_bh(&seq->lock); | 802 | spin_lock_bh(&seq->lock); |
803 | tipc_nameseq_subscribe(seq, s); | 803 | tipc_nameseq_subscribe(seq, s); |
804 | spin_unlock_bh(&seq->lock); | 804 | spin_unlock_bh(&seq->lock); |
@@ -819,7 +819,7 @@ void tipc_nametbl_unsubscribe(struct subscription *s) | |||
819 | 819 | ||
820 | write_lock_bh(&tipc_nametbl_lock); | 820 | write_lock_bh(&tipc_nametbl_lock); |
821 | seq = nametbl_find_seq(s->seq.type); | 821 | seq = nametbl_find_seq(s->seq.type); |
822 | if (seq != NULL){ | 822 | if (seq != NULL) { |
823 | spin_lock_bh(&seq->lock); | 823 | spin_lock_bh(&seq->lock); |
824 | list_del_init(&s->nameseq_list); | 824 | list_del_init(&s->nameseq_list); |
825 | spin_unlock_bh(&seq->lock); | 825 | spin_unlock_bh(&seq->lock); |
@@ -852,7 +852,7 @@ static void subseq_list(struct sub_seq *sseq, struct print_buf *buf, u32 depth, | |||
852 | } | 852 | } |
853 | 853 | ||
854 | do { | 854 | do { |
855 | sprintf (portIdStr, "<%u.%u.%u:%u>", | 855 | sprintf(portIdStr, "<%u.%u.%u:%u>", |
856 | tipc_zone(publ->node), tipc_cluster(publ->node), | 856 | tipc_zone(publ->node), tipc_cluster(publ->node), |
857 | tipc_node(publ->node), publ->ref); | 857 | tipc_node(publ->node), publ->ref); |
858 | tipc_printf(buf, "%-26s ", portIdStr); | 858 | tipc_printf(buf, "%-26s ", portIdStr); |