diff options
author | Bill Meier <wmeier@newsguy.com> | 2009-04-14 18:31:02 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2009-04-14 18:31:02 +0000 |
commit | 871c9c715249df434c78ade9ab2c2455048e5567 (patch) | |
tree | 0d2073fa711550869135bdd135159a37630b865f | |
parent | 14980f15921c20d581b39cc3c237e94a22bfce64 (diff) |
ep_strbuf usage: ep_strbuf_new_label("") --> ep_strbuf_new_label(NULL);
ep_strbuf_append() --> ep_strbuf_append_c() in a few cases.
svn path=/trunk/; revision=28052
-rw-r--r-- | epan/dissectors/packet-bgp.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-dns.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-enttec.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-icmpv6.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-iec104.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-pim.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-rtps.c | 4 |
7 files changed, 21 insertions, 21 deletions
diff --git a/epan/dissectors/packet-bgp.c b/epan/dissectors/packet-bgp.c index d45c63b64b..85fcc2d4b9 100644 --- a/epan/dissectors/packet-bgp.c +++ b/epan/dissectors/packet-bgp.c @@ -690,7 +690,7 @@ decode_prefix_MP(proto_tree *tree, int hf_addr4, int hf_addr6, case SAFNUM_MPLS_LABEL: plen = tvb_get_guint8(tvb, offset); - stack_strbuf = ep_strbuf_new_label(""); + stack_strbuf = ep_strbuf_new_label(NULL); labnum = decode_MPLS_stack(tvb, offset + 1, stack_strbuf); offset += (1 + labnum * 3); @@ -772,7 +772,7 @@ decode_prefix_MP(proto_tree *tree, int hf_addr4, int hf_addr6, case SAFNUM_LAB_VPNMULCAST: case SAFNUM_LAB_VPNUNIMULC: plen = tvb_get_guint8(tvb, offset); - stack_strbuf = ep_strbuf_new_label(""); + stack_strbuf = ep_strbuf_new_label(NULL); labnum = decode_MPLS_stack(tvb, offset + 1, stack_strbuf); offset += (1 + labnum * 3); @@ -896,7 +896,7 @@ decode_prefix_MP(proto_tree *tree, int hf_addr4, int hf_addr6, case SAFNUM_MPLS_LABEL: plen = tvb_get_guint8(tvb, offset); - stack_strbuf = ep_strbuf_new_label(""); + stack_strbuf = ep_strbuf_new_label(NULL); labnum = decode_MPLS_stack(tvb, offset + 1, stack_strbuf); offset += (1 + labnum * 3); @@ -952,7 +952,7 @@ decode_prefix_MP(proto_tree *tree, int hf_addr4, int hf_addr6, case SAFNUM_LAB_VPNMULCAST: case SAFNUM_LAB_VPNUNIMULC: plen = tvb_get_guint8(tvb, offset); - stack_strbuf = ep_strbuf_new_label(""); + stack_strbuf = ep_strbuf_new_label(NULL); labnum = decode_MPLS_stack(tvb, offset + 1, stack_strbuf); offset += (1 + labnum * 3); @@ -1041,7 +1041,7 @@ decode_prefix_MP(proto_tree *tree, int hf_addr4, int hf_addr6, ce_id=tvb_get_ntohs(tvb,offset+10); labblk_off=tvb_get_ntohs(tvb,offset+12); labblk_size=tvb_get_ntohs(tvb,offset+14); - stack_strbuf = ep_strbuf_new_label(""); + stack_strbuf = ep_strbuf_new_label(NULL); labnum = decode_MPLS_stack(tvb, offset + 16, stack_strbuf); switch (rd_type) { @@ -1490,7 +1490,7 @@ dissect_bgp_update(tvbuff_t *tvb, proto_tree *tree) hlen = tvb_get_ntohs(tvb, BGP_MARKER_SIZE); o = BGP_HEADER_SIZE; - junk_emstr = ep_strbuf_new_label(""); + junk_emstr = ep_strbuf_new_label(NULL); /* check for withdrawals */ len = tvb_get_ntohs(tvb, o); diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 4a3d26281c..25facd5e20 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -1311,7 +1311,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, int mask; int port_num; int i; - emem_strbuf_t *bitnames = ep_strbuf_new_label(""); + emem_strbuf_t *bitnames = ep_strbuf_new_label(NULL); if (rr_len < 4) { if (dns_tree != NULL) diff --git a/epan/dissectors/packet-enttec.c b/epan/dissectors/packet-enttec.c index 018cb5970e..67d2b70331 100644 --- a/epan/dissectors/packet-enttec.c +++ b/epan/dissectors/packet-enttec.c @@ -278,11 +278,11 @@ dissect_enttec_dmx_data(tvbuff_t *tvb, guint offset, proto_tree *tree) si = proto_item_add_subtree(hi, ett_enttec); row_count = (ui/global_disp_col_count) + ((ui%global_disp_col_count) == 0 ? 0 : 1); - dmx_epstr = ep_strbuf_new_label(""); + dmx_epstr = ep_strbuf_new_label(NULL); for (r=0; r < row_count;r++) { for (c=0;(c < global_disp_col_count) && (((r*global_disp_col_count)+c) < ui);c++) { if ((c % (global_disp_col_count/2)) == 0) { - ep_strbuf_append(dmx_epstr, " "); + ep_strbuf_append_c(dmx_epstr, ' '); } v = dmx_data[(r*global_disp_col_count)+c]; if (global_disp_chan_val_type == 0) { diff --git a/epan/dissectors/packet-icmpv6.c b/epan/dissectors/packet-icmpv6.c index c6571e8708..547d2fae69 100644 --- a/epan/dissectors/packet-icmpv6.c +++ b/epan/dissectors/packet-icmpv6.c @@ -924,7 +924,7 @@ bitrange(tvbuff_t *tvb, int offset, int l, int s) emem_strbuf_t *strbuf; int i; - strbuf = ep_strbuf_new_label(""); + strbuf = ep_strbuf_new_label(NULL); for (i = 0; i < l; i++) bitrange0(tvb_get_ntohl(tvb, offset + i * 4), s + i * 4, strbuf); diff --git a/epan/dissectors/packet-iec104.c b/epan/dissectors/packet-iec104.c index 40d8e8a417..5d5a1f3808 100644 --- a/epan/dissectors/packet-iec104.c +++ b/epan/dissectors/packet-iec104.c @@ -433,7 +433,7 @@ static void dissect_iec104asdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr } asduh = ep_alloc(sizeof(struct asduheader)); - res = ep_strbuf_new_label(""); + res = ep_strbuf_new_label(NULL); /*** *** START: Common to 'Packet List' and 'Packet Details' *** ***/ if (Len >= ASDU_HEAD_LEN) { @@ -450,13 +450,13 @@ static void dissect_iec104asdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* Build common string for 'Packet List' and 'Packet Details' */ ep_strbuf_printf(res, "%u,%u%s%u ", asduh->AddrLow, asduh->AddrHigh, pinfo->srcport == iec104port ? "->" : "<-", asduh->OA); ep_strbuf_append(res, val_to_str(asduh->TypeId, asdu_types, "<TypeId=%u>")); - ep_strbuf_append(res, " "); + ep_strbuf_append_c(res, ' '); cause_str = val_to_str(asduh->TNCause & F_CAUSE, causetx_types, " <CauseTx=%u>"); ep_strbuf_append(res, cause_str); if (asduh->TNCause & F_NEGA) ep_strbuf_append(res, "_NEGA"); if (asduh->TNCause & F_TEST) ep_strbuf_append(res, "_TEST"); if (asduh->TNCause & (F_TEST | F_NEGA)) { - for (Ind=strlen(cause_str); Ind< 7; Ind++) ep_strbuf_append(res, " "); + for (Ind=strlen(cause_str); Ind< 7; Ind++) ep_strbuf_append_c(res, ' '); } ep_strbuf_append_printf(res, " IOA=%d", asduh->IOA); if (asduh->NumIx > 1) { @@ -468,7 +468,7 @@ static void dissect_iec104asdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr else { ep_strbuf_printf(res, "<ERR Short Asdu, Len=%u>", Len); } - ep_strbuf_append(res, " "); /* We add an space to separate possible APCIs/ASDUs in the same packet */ + ep_strbuf_append_c(res, ' '); /* We add a space to separate possible APCIs/ASDUs in the same packet */ /*** *** END: Common to 'Packet List' and 'Packet Details' *** ***/ /*** *** DISSECT 'Packet List' *** ***/ @@ -565,7 +565,7 @@ static void dissect_iec104apci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr Brossa = TcpLen; } /* Construir string comu a List i Details */ - res = ep_strbuf_new_label(""); + res = ep_strbuf_new_label(NULL); if (Brossa > 0) ep_strbuf_append_printf(res, "<ERR %u bytes> ", Brossa); if (Brossa != TcpLen) { @@ -579,9 +579,9 @@ static void dissect_iec104apci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr ep_strbuf_append_printf(res, "%d)", apcih->Rx); /* Align first packets */ if (apcih->Tx < 10) - ep_strbuf_append(res, " "); + ep_strbuf_append_c(res, ' '); if (apcih->Rx < 10) - ep_strbuf_append(res, " "); + ep_strbuf_append_c(res, ' '); break; case U_TYPE: ep_strbuf_append_printf(res, "%s)", val_to_str(apcih->UType >> 2, u_types, "<ERR>")); @@ -593,7 +593,7 @@ static void dissect_iec104apci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr ep_strbuf_append_printf(res, "<ERR ApduLen=%u bytes> ", apcih->ApduLen); } } - ep_strbuf_append(res, " "); /* We add an space to separate possible APCIs/ASDUs in the same packet */ + ep_strbuf_append_c(res, ' '); /* We add a space to separate possible APCIs/ASDUs in the same packet */ /*** *** END: Common to 'Packet List' and 'Packet Details' *** ***/ /*** *** Dissect 'Packet List' *** ***/ diff --git a/epan/dissectors/packet-pim.c b/epan/dissectors/packet-pim.c index de439bdad8..005f751042 100644 --- a/epan/dissectors/packet-pim.c +++ b/epan/dissectors/packet-pim.c @@ -507,7 +507,7 @@ dissect_pim_addr(tvbuff_t *tvb, int offset, enum pimv2_addrtype at, return NULL; } - strbuf = ep_strbuf_new_label(""); + strbuf = ep_strbuf_new_label(NULL); switch (at) { case pimv2_unicast: switch (af) { diff --git a/epan/dissectors/packet-rtps.c b/epan/dissectors/packet-rtps.c index 9253357385..ad96562b0f 100644 --- a/epan/dissectors/packet-rtps.c +++ b/epan/dissectors/packet-rtps.c @@ -2619,7 +2619,7 @@ static gint rtps_util_add_typecode(proto_tree *tree, /* Array print */ if (arr_dimension != NULL) { /* Printing an array */ - emem_strbuf_t *dim_str = ep_strbuf_new_label(""); + emem_strbuf_t *dim_str = ep_strbuf_new_label(NULL); for (i = 0; i < MAX_ARRAY_DIMENSION; ++i) { if (arr_dimension[i] != 0) { ep_strbuf_append_printf(dim_str, "[%d]", arr_dimension[i]); @@ -5893,7 +5893,7 @@ static gboolean dissect_rtps(tvbuff_t *tvb, /* Compose the content of the 'summary' column */ if ((pinfo != NULL) && (pinfo->cinfo != NULL) && (check_col(pinfo->cinfo, COL_INFO))) { - emem_strbuf_t *info_buf = ep_strbuf_new_label(""); + emem_strbuf_t *info_buf = ep_strbuf_new_label(NULL); struct SMCounterRecord *smcr_ptr = smcr_head; |