Set the svn:eol-style property on all text files to "native", so that
[obnox/wireshark/wip.git] / packet-nlsp.c
index b060113975085c34f94065b3aa4790fb6c4c5b0a..11b31595101dc8dab6a972565b28d44eb72a459e 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-nlsp.c
  * Routines for NetWare Link Services Protocol
  *
- * $Id: packet-nlsp.c,v 1.3 2003/04/02 08:13:35 guy Exp $
+ * $Id$
  *
  * Based on ISIS dissector by Stuart Stanley <stuarts@mxmail.net>
  *
@@ -32,7 +32,6 @@
 #include <string.h>
 #include <glib.h>
 #include <epan/packet.h>
-#include "nlpid.h"
 #include "packet-ipx.h"
 
 /* NLSP base header */
@@ -190,7 +189,6 @@ nlsp_dissect_clvs(tvbuff_t *tvb, proto_tree *tree, int offset,
        int q;
        proto_item      *ti;
        proto_tree      *clv_tree;
-       char            sbuf[255];
        int             adj;
 
        while ( len > 0 ) {
@@ -215,10 +213,9 @@ nlsp_dissect_clvs(tvbuff_t *tvb, proto_tree *tree, int offset,
                if ( opts[q].dissect ) {
                        if (tree) {
                                /* adjust by 2 for code/len octets */
-                               snprintf ( sbuf, sizeof(sbuf), "%s (%d)",
-                                       opts[q].tree_text, length );
                                ti = proto_tree_add_text(tree, tvb, offset - 2,
-                                       length + 2, sbuf);
+                                       length + 2, "%s (%u)",
+                                       opts[q].tree_text, length );
                                clv_tree = proto_item_add_subtree(ti,
                                        *opts[q].tree_id );
                        } else {
@@ -228,10 +225,9 @@ nlsp_dissect_clvs(tvbuff_t *tvb, proto_tree *tree, int offset,
                            length);
                } else {
                        if (tree) {
-                               snprintf ( sbuf, sizeof(sbuf),
-                                       "Unknown code (%d:%d)", code, length );
                                ti = proto_tree_add_text(tree, tvb, offset - 2,
-                                       length + 2, sbuf);
+                                       length + 2, "Unknown code %u (%u)",
+                                       code, length);
                                clv_tree = proto_item_add_subtree(ti,
                                        unknown_tree_id );
                        } else {
@@ -1589,20 +1585,16 @@ proto_register_nlsp(void)
            { &hf_nlsp_hello_circuit_type,
              { "Circuit Type", "nlsp.hello.circuit_type", FT_UINT8, BASE_DEC,
                VALS(nlsp_hello_circuit_type_vals), NLSP_HELLO_CTYPE_MASK,
-               NULL, HFILL }},
-
-           { &hf_nlsp_hello_holding_timer,
-             { "Holding Timer", "nlsp.hello.holding_timer", FT_UINT8, BASE_DEC,
-               NULL, 0x0, NULL, HFILL }},
+               "", HFILL }},
 
            { &hf_nlsp_hello_holding_timer,
              { "Holding Timer", "nlsp.hello.holding_timer", FT_UINT8, BASE_DEC,
-               NULL, 0x0, NULL, HFILL }},
+               NULL, 0x0, "", HFILL }},
 
            { &hf_nlsp_hello_priority,
              { "Priority", "nlsp.hello.priority", FT_UINT8, BASE_DEC,
                NULL, NLSP_HELLO_PRIORITY_MASK,
-               NULL, HFILL }},
+               "", HFILL }},
 
            { &hf_nlsp_lsp_sequence_number,
              { "Sequence Number", "nlsp.sequence_number",