Merge branch 'for-linus' of git://git.infradead.org/~dedekind/ubi-2.6
[sfrench/cifs-2.6.git] / net / tipc / link.c
index 1d674e0848fa4d475cd5a391c4b3c382d83c7de9..cefa99824c58a1a1f061db74b6491ec09805d7cf 100644 (file)
@@ -2383,10 +2383,10 @@ void tipc_link_changeover(struct link *l_ptr)
                struct tipc_msg *msg = buf_msg(crs);
 
                if ((msg_user(msg) == MSG_BUNDLER) && split_bundles) {
-                       u32 msgcount = msg_msgcnt(msg);
                        struct tipc_msg *m = msg_get_wrapped(msg);
                        unchar* pos = (unchar*)m;
 
+                       msgcount = msg_msgcnt(msg);
                        while (msgcount--) {
                                msg_set_seqno(m,msg_seqno(msg));
                                tipc_link_tunnel(l_ptr, &tunnel_hdr, m,
@@ -3251,7 +3251,7 @@ static void link_print(struct link *l_ptr, struct print_buf *buf,
                if ((mod(msg_seqno(buf_msg(l_ptr->last_out)) -
                         msg_seqno(buf_msg(l_ptr->first_out)))
                     != (l_ptr->out_queue_size - 1))
-                   || (l_ptr->last_out->next != 0)) {
+                   || (l_ptr->last_out->next != NULL)) {
                        tipc_printf(buf, "\nSend queue inconsistency\n");
                        tipc_printf(buf, "first_out= %x ", l_ptr->first_out);
                        tipc_printf(buf, "next_out= %x ", l_ptr->next_out);