aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-01-04 05:22:43 +0000
committerMichael Mann <mmann78@netscape.net>2013-01-04 05:22:43 +0000
commit86d690880fb63891d223aa663ca5901c790b74af (patch)
tree47187c5da15e3c239e9bf40c79601c196ac0f114 /epan
parentd36b4c8525161167a32eac3b1feb98f8f5d6184e (diff)
replace "unsigned" datatype with "guint". Some mpeg files needed "unsigned int" instead.
bugs 7825-7827 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7825) svn path=/trunk/; revision=46928
Diffstat (limited to 'epan')
-rw-r--r--epan/camel-persistentdata.c4
-rw-r--r--epan/crypt/md5.c2
-rw-r--r--epan/dfilter/dfilter-macro.c2
-rw-r--r--epan/diam_dict.h8
-rw-r--r--epan/dissectors/packet-babel.c2
-rw-r--r--epan/dissectors/packet-dmx-chan.c2
-rw-r--r--epan/dissectors/packet-dmx-sip.c10
-rw-r--r--epan/dissectors/packet-dmx-test.c4
-rw-r--r--epan/dissectors/packet-dmx-text.c4
-rw-r--r--epan/dissectors/packet-dmx.c2
-rw-r--r--epan/dissectors/packet-k12.c2
-rw-r--r--epan/dissectors/packet-pdcp-lte.c22
-rw-r--r--epan/dissectors/packet-pw-atm.c2
-rw-r--r--epan/dissectors/packet-rlc-lte.c18
-rw-r--r--epan/dissectors/packet-ssl-utils.c10
-rw-r--r--epan/dissectors/packet-teredo.c2
-rw-r--r--epan/dissectors/packet-vicp.c2
-rw-r--r--epan/dissectors/packet-x11.c20
-rw-r--r--epan/tcap-persistentdata.c4
-rw-r--r--epan/uat.c14
-rw-r--r--epan/uat.h20
21 files changed, 78 insertions, 78 deletions
diff --git a/epan/camel-persistentdata.c b/epan/camel-persistentdata.c
index 74e1f418a6..c7d7ed1cc5 100644
--- a/epan/camel-persistentdata.c
+++ b/epan/camel-persistentdata.c
@@ -127,9 +127,9 @@ guint32 camelsrt_global_SessionId=1;
#ifdef DEBUG_CAMELSRT
#include <stdio.h>
#include <stdarg.h>
-static unsigned debug_level = 99;
+static guint debug_level = 99;
-static void dbg(unsigned level, char *fmt, ...) {
+static void dbg(guint level, char *fmt, ...) {
va_list ap;
if (level > debug_level) return;
diff --git a/epan/crypt/md5.c b/epan/crypt/md5.c
index 916b19e316..aaf6107f4c 100644
--- a/epan/crypt/md5.c
+++ b/epan/crypt/md5.c
@@ -143,7 +143,7 @@ void md5_append( md5_state_t *ctx, unsigned char const *buf, size_t len)
*/
void md5_finish(md5_state_t *ctx, unsigned char digest[16])
{
- unsigned count;
+ guint count;
unsigned char *p;
/* Compute number of bytes mod 64 */
diff --git a/epan/dfilter/dfilter-macro.c b/epan/dfilter/dfilter-macro.c
index 3c43191515..f4dd745cfa 100644
--- a/epan/dfilter/dfilter-macro.c
+++ b/epan/dfilter/dfilter-macro.c
@@ -579,7 +579,7 @@ static void* macro_copy(void* dest, const void* orig, size_t len _U_) {
return d;
}
-static gboolean macro_name_chk(void* r _U_, const char* in_name, unsigned name_len, const void* u1 _U_, const void* u2 _U_, const char** error) {
+static gboolean macro_name_chk(void* r _U_, const char* in_name, guint name_len, const void* u1 _U_, const void* u2 _U_, const char** error) {
guint i;
if (name_len == 0) {
diff --git a/epan/diam_dict.h b/epan/diam_dict.h
index 6840ae01b0..9f0a4f601e 100644
--- a/epan/diam_dict.h
+++ b/epan/diam_dict.h
@@ -27,7 +27,7 @@
struct _ddict_namecode_t {
char* name;
- unsigned code;
+ guint code;
struct _ddict_namecode_t* next;
};
@@ -38,7 +38,7 @@ typedef struct _ddict_namecode_t ddict_application_t;
typedef struct _ddict_vendor_t {
char* name;
char* desc;
- unsigned code;
+ guint code;
struct _ddict_vendor_t* next;
} ddict_vendor_t;
@@ -47,7 +47,7 @@ typedef struct _ddict_avp_t {
char* description;
char* vendor;
char* type;
- unsigned code;
+ guint code;
ddict_gavp_t* gavps;
ddict_enum_t* enums;
struct _ddict_avp_t* next;
@@ -62,7 +62,7 @@ typedef struct _ddict_typedefn_t {
typedef struct _ddict_cmd_t {
char* name;
char* vendor;
- unsigned code;
+ guint code;
struct _ddict_cmd_t* next;
} ddict_cmd_t;
diff --git a/epan/dissectors/packet-babel.c b/epan/dissectors/packet-babel.c
index deff931901..9dce3953b1 100644
--- a/epan/dissectors/packet-babel.c
+++ b/epan/dissectors/packet-babel.c
@@ -124,7 +124,7 @@ network_prefix(int ae, int plen, unsigned int omitted,
const unsigned char *p, const unsigned char *dp,
unsigned int len, unsigned char *p_r)
{
- unsigned pb;
+ guint pb;
unsigned char prefix[16];
if (plen >= 0)
diff --git a/epan/dissectors/packet-dmx-chan.c b/epan/dissectors/packet-dmx-chan.c
index 9e7671f1ac..66e99c5915 100644
--- a/epan/dissectors/packet-dmx-chan.c
+++ b/epan/dissectors/packet-dmx-chan.c
@@ -76,7 +76,7 @@ dissect_dmx_chan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *item;
guint16 length,r,c,row_count;
guint8 v;
- unsigned offset = 0;
+ guint offset = 0;
proto_tree *ti = proto_tree_add_item(tree, proto_dmx_chan, tvb, offset, -1, ENC_NA);
proto_tree *dmx_chan_tree = proto_item_add_subtree(ti, ett_dmx_chan);
diff --git a/epan/dissectors/packet-dmx-sip.c b/epan/dissectors/packet-dmx-sip.c
index bfb93aa273..74a81b346f 100644
--- a/epan/dissectors/packet-dmx-sip.c
+++ b/epan/dissectors/packet-dmx-sip.c
@@ -67,10 +67,10 @@ static int hf_dmx_sip_trailer = -1;
static int ett_dmx_sip = -1;
static guint8
-dmx_sip_checksum(tvbuff_t *tvb, unsigned length)
+dmx_sip_checksum(tvbuff_t *tvb, guint length)
{
guint8 sum = DMX_SC_SIP;
- unsigned i;
+ guint i;
for (i = 0; i < length; i++)
sum += tvb_get_guint8(tvb, i);
return sum;
@@ -83,9 +83,9 @@ dissect_dmx_sip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_clear(pinfo->cinfo, COL_INFO);
if (tree != NULL) {
- unsigned offset = 0;
- unsigned byte_count;
- unsigned checksum, checksum_shouldbe;
+ guint offset = 0;
+ guint byte_count;
+ guint checksum, checksum_shouldbe;
proto_item *item;
proto_tree *checksum_tree;
diff --git a/epan/dissectors/packet-dmx-test.c b/epan/dissectors/packet-dmx-test.c
index 71f4a32c30..e17e0ab3c1 100644
--- a/epan/dissectors/packet-dmx-test.c
+++ b/epan/dissectors/packet-dmx-test.c
@@ -58,8 +58,8 @@ dissect_dmx_test(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_clear(pinfo->cinfo, COL_INFO);
if (tree != NULL) {
- unsigned offset = 0;
- unsigned size, i, test_data_is_ok;
+ guint offset = 0;
+ guint size, i, test_data_is_ok;
proto_tree *test_data_tree;
proto_item *item;
diff --git a/epan/dissectors/packet-dmx-text.c b/epan/dissectors/packet-dmx-text.c
index 20ed974169..29397efebd 100644
--- a/epan/dissectors/packet-dmx-text.c
+++ b/epan/dissectors/packet-dmx-text.c
@@ -55,8 +55,8 @@ dissect_dmx_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_clear(pinfo->cinfo, COL_INFO);
if (tree != NULL) {
- unsigned offset = 0;
- unsigned size;
+ guint offset = 0;
+ guint size;
proto_tree *ti = proto_tree_add_item(tree, proto_dmx_text, tvb,
offset, -1, FALSE);
diff --git a/epan/dissectors/packet-dmx.c b/epan/dissectors/packet-dmx.c
index 7ba60ed8ec..db2a563e19 100644
--- a/epan/dissectors/packet-dmx.c
+++ b/epan/dissectors/packet-dmx.c
@@ -74,7 +74,7 @@ static void
dissect_dmx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
tvbuff_t *next_tvb;
- unsigned offset = 0;
+ guint offset = 0;
guint8 start_code;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DMX");
diff --git a/epan/dissectors/packet-k12.c b/epan/dissectors/packet-k12.c
index 53065b5849..bb5b915d1b 100644
--- a/epan/dissectors/packet-k12.c
+++ b/epan/dissectors/packet-k12.c
@@ -360,7 +360,7 @@ k12_free_cb(void* r)
static gboolean
-protos_chk_cb(void* r _U_, const char* p, unsigned len, const void* u1 _U_, const void* u2 _U_, const char** err)
+protos_chk_cb(void* r _U_, const char* p, guint len, const void* u1 _U_, const void* u2 _U_, const char** err)
{
gchar** protos;
gchar* line = ep_strndup(p,len);
diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c
index 0306bba21a..ce616ece01 100644
--- a/epan/dissectors/packet-pdcp-lte.c
+++ b/epan/dissectors/packet-pdcp-lte.c
@@ -240,11 +240,11 @@ typedef struct
{
/* Using bit fields to fit into 32 bits, so avoiding the need to allocate
heap memory for these structs */
- unsigned ueId : 16;
- unsigned plane : 2;
- unsigned channelId : 6;
- unsigned direction : 1;
- unsigned notUsed : 7;
+ guint ueId : 16;
+ guint plane : 2;
+ guint channelId : 6;
+ guint direction : 1;
+ guint notUsed : 7;
} pdcp_channel_hash_key;
/* Channel state */
@@ -276,12 +276,12 @@ static guint pdcp_channel_hash_func(gconstpointer v)
/* Hash table types & functions for frame reports */
typedef struct {
- guint32 frameNumber;
- unsigned SN : 15;
- unsigned plane : 2;
- unsigned channelId: 5;
- unsigned direction: 1;
- unsigned notUsed : 9;
+ guint32 frameNumber;
+ guint32 SN : 15;
+ guint32 plane : 2;
+ guint32 channelId: 5;
+ guint32 direction: 1;
+ guint32 notUsed : 9;
} pdcp_result_hash_key;
static gint pdcp_result_hash_equal(gconstpointer v, gconstpointer v2)
diff --git a/epan/dissectors/packet-pw-atm.c b/epan/dissectors/packet-pw-atm.c
index 135ddd2c7f..d3d37c45ad 100644
--- a/epan/dissectors/packet-pw-atm.c
+++ b/epan/dissectors/packet-pw-atm.c
@@ -347,7 +347,7 @@ static void
prepare_pseudo_header_atm(
union wtap_pseudo_header * const ph,
const pwatm_private_data_t * const pdata,
- const unsigned aal)
+ const guint aal)
{
DISSECTOR_ASSERT(NULL != pdata);
DISSECTOR_ASSERT(NULL != ph);
diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c
index a8f5b8cfef..f0402674c8 100644
--- a/epan/dissectors/packet-rlc-lte.c
+++ b/epan/dissectors/packet-rlc-lte.c
@@ -331,10 +331,10 @@ static guint16 s_lengths[MAX_RLC_SDUS];
/* Channel key */
typedef struct
{
- unsigned ueId : 16;
- unsigned channelType : 3;
- unsigned channelId : 5;
- unsigned direction : 1;
+ guint ueId : 16;
+ guint channelType : 3;
+ guint channelId : 5;
+ guint direction : 1;
} channel_hash_key;
@@ -899,11 +899,11 @@ static guint rlc_channel_hash_func(gconstpointer v)
/* Result hash */
typedef struct {
- guint32 frameNumber;
- unsigned SN : 10;
- unsigned channelType : 2;
- unsigned channelId: 5;
- unsigned direction: 1;
+ guint32 frameNumber;
+ guint32 SN : 10;
+ guint32 channelType : 2;
+ guint32 channelId: 5;
+ guint32 direction: 1;
} rlc_result_hash_key;
/* Compare 2 rlc_result_hash_key structs */
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c
index 1a94feded1..62c11b786f 100644
--- a/epan/dissectors/packet-ssl-utils.c
+++ b/epan/dissectors/packet-ssl-utils.c
@@ -3945,7 +3945,7 @@ ssl_print_string(const gchar* name, const StringInfo* data)
/* checks for SSL and DTLS UAT key list fields */
gboolean
-ssldecrypt_uat_fld_ip_chk_cb(void* r _U_, const char* p, unsigned len _U_, const void* u1 _U_, const void* u2 _U_, const char** err)
+ssldecrypt_uat_fld_ip_chk_cb(void* r _U_, const char* p, guint len _U_, const void* u1 _U_, const void* u2 _U_, const char** err)
{
if (!p || strlen(p) == 0u) {
*err = ep_strdup_printf("No IP address given.");
@@ -3957,7 +3957,7 @@ ssldecrypt_uat_fld_ip_chk_cb(void* r _U_, const char* p, unsigned len _U_, const
}
gboolean
-ssldecrypt_uat_fld_port_chk_cb(void* r _U_, const char* p, unsigned len _U_, const void* u1 _U_, const void* u2 _U_, const char** err)
+ssldecrypt_uat_fld_port_chk_cb(void* r _U_, const char* p, guint len _U_, const void* u1 _U_, const void* u2 _U_, const char** err)
{
if (!p || strlen(p) == 0u) {
*err = ep_strdup_printf("No Port given.");
@@ -3977,7 +3977,7 @@ ssldecrypt_uat_fld_port_chk_cb(void* r _U_, const char* p, unsigned len _U_, con
}
gboolean
-ssldecrypt_uat_fld_protocol_chk_cb(void* r _U_, const char* p, unsigned len _U_, const void* u1 _U_, const void* u2 _U_, const char** err)
+ssldecrypt_uat_fld_protocol_chk_cb(void* r _U_, const char* p, guint len _U_, const void* u1 _U_, const void* u2 _U_, const char** err)
{
if (!p || strlen(p) == 0u) {
*err = ep_strdup_printf("No protocol given.");
@@ -3994,7 +3994,7 @@ ssldecrypt_uat_fld_protocol_chk_cb(void* r _U_, const char* p, unsigned len _U_,
}
gboolean
-ssldecrypt_uat_fld_fileopen_chk_cb(void* r _U_, const char* p, unsigned len _U_, const void* u1 _U_, const void* u2 _U_, const char** err)
+ssldecrypt_uat_fld_fileopen_chk_cb(void* r _U_, const char* p, guint len _U_, const void* u1 _U_, const void* u2 _U_, const char** err)
{
ws_statb64 st;
@@ -4013,7 +4013,7 @@ ssldecrypt_uat_fld_fileopen_chk_cb(void* r _U_, const char* p, unsigned len _U_,
}
gboolean
-ssldecrypt_uat_fld_password_chk_cb(void* r _U_, const char* p, unsigned len _U_, const void* u1 _U_, const void* u2 _U_, const char ** err)
+ssldecrypt_uat_fld_password_chk_cb(void* r _U_, const char* p, guint len _U_, const void* u1 _U_, const void* u2 _U_, const char ** err)
{
ssldecrypt_assoc_t* f = r;
FILE *fp = NULL;
diff --git a/epan/dissectors/packet-teredo.c b/epan/dissectors/packet-teredo.c
index 145931de94..0325fc7a7c 100644
--- a/epan/dissectors/packet-teredo.c
+++ b/epan/dissectors/packet-teredo.c
@@ -83,7 +83,7 @@ static int
parse_teredo_auth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int offset, e_teredohdr *teredoh)
{
- unsigned idlen, aulen;
+ guint idlen, aulen;
if (check_col(pinfo->cinfo, COL_INFO))
col_append_sep_str (pinfo->cinfo, COL_INFO, ", ",
diff --git a/epan/dissectors/packet-vicp.c b/epan/dissectors/packet-vicp.c
index 21ccb0e7c4..2fe44ed9f8 100644
--- a/epan/dissectors/packet-vicp.c
+++ b/epan/dissectors/packet-vicp.c
@@ -48,7 +48,7 @@ static void dissect_vicp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *vicp_tree;
ptvcursor_t* cursor;
- unsigned len;
+ guint len;
if (tvb_reported_length_remaining(tvb, 0) < 8)
{
diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c
index edf9f180f3..0f488bf77e 100644
--- a/epan/dissectors/packet-x11.c
+++ b/epan/dissectors/packet-x11.c
@@ -1353,7 +1353,7 @@ static guint32 add_boolean(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf)
static void colorFlags(tvbuff_t *tvb, int *offsetp, proto_tree *t)
{
- unsigned do_red_green_blue = VALUE8(tvb, *offsetp);
+ guint do_red_green_blue = VALUE8(tvb, *offsetp);
proto_item *ti;
proto_tree *tt;
@@ -1541,7 +1541,7 @@ static void listOfColorItem(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf,
while(length--) {
proto_item *tti;
proto_tree *ttt;
- unsigned do_red_green_blue;
+ guint do_red_green_blue;
guint16 red, green, blue;
emem_strbuf_t *buffer;
const char *sep;
@@ -2026,7 +2026,7 @@ static void listOfRectangle(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf,
proto_tree *tt = proto_item_add_subtree(ti, ett_x11_list_of_rectangle);
while(length--) {
gint16 x, y;
- unsigned width, height;
+ guint width, height;
proto_item *tti;
proto_tree *ttt;
@@ -2099,7 +2099,7 @@ static void listOfString8(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf,
tt = proto_item_add_subtree(ti, ett_x11_list_of_string8);
while(length--) {
- unsigned l = VALUE8(tvb, *offsetp);
+ guint l = VALUE8(tvb, *offsetp);
s = tvb_get_ephemeral_string(tvb, *offsetp + 1, l);
proto_tree_add_string_format(tt, hf_item, tvb, *offsetp, l + 1, s, "\"%s\"", s);
*offsetp += l + 1;
@@ -2108,7 +2108,7 @@ static void listOfString8(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf,
#define STRING16_MAX_DISPLAYED_LENGTH 150
-static int stringIsActuallyAn8BitString(tvbuff_t *tvb, int offset, unsigned length)
+static int stringIsActuallyAn8BitString(tvbuff_t *tvb, int offset, guint length)
{
if (length > STRING16_MAX_DISPLAYED_LENGTH) length = STRING16_MAX_DISPLAYED_LENGTH;
for(; length > 0; offset += 2, length--) {
@@ -2122,11 +2122,11 @@ static int stringIsActuallyAn8BitString(tvbuff_t *tvb, int offset, unsigned leng
static void string16_with_buffer_preallocated(tvbuff_t *tvb, proto_tree *t,
int hf, int hf_bytes,
- int offset, unsigned length,
+ int offset, guint length,
char **s, guint byte_order)
{
int truncated = FALSE;
- unsigned l = length / 2;
+ guint l = length / 2;
if (stringIsActuallyAn8BitString(tvb, offset, l)) {
char *dp;
@@ -2186,7 +2186,7 @@ static void listOfTextItem(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf,
tt = proto_item_add_subtree(ti, ett_x11_list_of_text_item);
while(n--) {
- unsigned l = VALUE8(tvb, *offsetp);
+ guint l = VALUE8(tvb, *offsetp);
if (l == 255) { /* Item is a font */
fid = tvb_get_ntohl(tvb, *offsetp + 1);
proto_tree_add_uint(tt, hf_x11_textitem_font, tvb, *offsetp, 5, fid);
@@ -2464,7 +2464,7 @@ static void setOfPointerEvent(tvbuff_t *tvb, int *offsetp, proto_tree *t,
}
static void string8(tvbuff_t *tvb, int *offsetp, proto_tree *t,
- int hf, unsigned length)
+ int hf, guint length)
{
proto_tree_add_item(t, hf, tvb, *offsetp, length, ENC_NA|ENC_ASCII);
*offsetp += length;
@@ -2473,7 +2473,7 @@ static void string8(tvbuff_t *tvb, int *offsetp, proto_tree *t,
/* The length is the length of the _byte_zone_ (twice the length of the string) */
static void string16(tvbuff_t *tvb, int *offsetp, proto_tree *t, int hf,
- int hf_bytes, unsigned length, guint byte_order)
+ int hf_bytes, guint length, guint byte_order)
{
char *s = NULL;
diff --git a/epan/tcap-persistentdata.c b/epan/tcap-persistentdata.c
index d886869a5b..189504b33c 100644
--- a/epan/tcap-persistentdata.c
+++ b/epan/tcap-persistentdata.c
@@ -139,10 +139,10 @@ guint32 tcapsrt_global_SessionId=1;
#ifdef DEBUG_TCAPSRT
#include <stdio.h>
#include <stdarg.h>
-static unsigned debug_level = 99;
+static guint debug_level = 99;
static void
-dbg(unsigned level, char* fmt, ...)
+dbg(guint level, char* fmt, ...)
{
va_list ap;
diff --git a/epan/uat.c b/epan/uat.c
index 9c9ff8ba53..e4b5ba235a 100644
--- a/epan/uat.c
+++ b/epan/uat.c
@@ -389,7 +389,7 @@ void uat_load_all(void) {
}
-gboolean uat_fld_chk_str(void* u1 _U_, const char* strptr, unsigned len _U_, const void* u2 _U_, const void* u3 _U_, const char** err) {
+gboolean uat_fld_chk_str(void* u1 _U_, const char* strptr, guint len _U_, const void* u2 _U_, const void* u3 _U_, const char** err) {
if (strptr == NULL) {
*err = "NULL pointer";
return FALSE;
@@ -399,7 +399,7 @@ gboolean uat_fld_chk_str(void* u1 _U_, const char* strptr, unsigned len _U_, con
return TRUE;
}
-gboolean uat_fld_chk_oid(void* u1 _U_, const char* strptr, unsigned len, const void* u2 _U_, const void* u3 _U_, const char** err) {
+gboolean uat_fld_chk_oid(void* u1 _U_, const char* strptr, guint len, const void* u2 _U_, const void* u3 _U_, const char** err) {
unsigned int i;
*err = NULL;
@@ -425,7 +425,7 @@ gboolean uat_fld_chk_oid(void* u1 _U_, const char* strptr, unsigned len, const v
return *err == NULL;
}
-gboolean uat_fld_chk_proto(void* u1 _U_, const char* strptr, unsigned len, const void* u2 _U_, const void* u3 _U_, const char** err) {
+gboolean uat_fld_chk_proto(void* u1 _U_, const char* strptr, guint len, const void* u2 _U_, const void* u3 _U_, const char** err) {
if (len) {
char* name = ep_strndup(strptr,len);
ascii_strdown_inplace(name);
@@ -444,7 +444,7 @@ gboolean uat_fld_chk_proto(void* u1 _U_, const char* strptr, unsigned len, const
}
}
-gboolean uat_fld_chk_num_dec(void* u1 _U_, const char* strptr, unsigned len, const void* u2 _U_, const void* u3 _U_, const char** err) {
+gboolean uat_fld_chk_num_dec(void* u1 _U_, const char* strptr, guint len, const void* u2 _U_, const void* u3 _U_, const char** err) {
if (len > 0) {
char* str = ep_strndup(strptr,len);
long i = strtol(str,&str,10);
@@ -459,7 +459,7 @@ gboolean uat_fld_chk_num_dec(void* u1 _U_, const char* strptr, unsigned len, con
return TRUE;
}
-gboolean uat_fld_chk_num_hex(void* u1 _U_, const char* strptr, unsigned len, const void* u2 _U_, const void* u3 _U_, const char** err) {
+gboolean uat_fld_chk_num_hex(void* u1 _U_, const char* strptr, guint len, const void* u2 _U_, const void* u3 _U_, const char** err) {
if (len > 0) {
char* str = ep_strndup(strptr,len);
long i = strtol(str,&str,16);
@@ -474,7 +474,7 @@ gboolean uat_fld_chk_num_hex(void* u1 _U_, const char* strptr, unsigned len, con
return TRUE;
}
-gboolean uat_fld_chk_enum(void* u1 _U_, const char* strptr, unsigned len, const void* v, const void* u3 _U_, const char** err) {
+gboolean uat_fld_chk_enum(void* u1 _U_, const char* strptr, guint len, const void* v, const void* u3 _U_, const char** err) {
char* str = ep_strndup(strptr,len);
guint i;
const value_string* vs = v;
@@ -490,7 +490,7 @@ gboolean uat_fld_chk_enum(void* u1 _U_, const char* strptr, unsigned len, const
return FALSE;
}
-gboolean uat_fld_chk_range(void* u1 _U_, const char* strptr, unsigned len, const void* v _U_, const void* u3, const char** err) {
+gboolean uat_fld_chk_range(void* u1 _U_, const char* strptr, guint len, const void* v _U_, const void* u3, const char** err) {
char* str = ep_strndup(strptr,len);
range_t* r = NULL;
convert_ret_t ret = range_convert_str(&r, str,GPOINTER_TO_UINT(u3));
diff --git a/epan/uat.h b/epan/uat.h
index e401b8e1f0..6a50aeb3d8 100644
--- a/epan/uat.h
+++ b/epan/uat.h
@@ -331,7 +331,7 @@ CHK_STR_IS_DECL(isdigit);
CHK_STR_IS_DECL(isxdigit);
#define CHK_STR_IS_DEF(what) \
-gboolean uat_fld_chk_str_ ## what (void* u1 _U_, const char* strptr, unsigned len, const void* u2 _U_, const void* u3 _U_, const char** err) { \
+gboolean uat_fld_chk_str_ ## what (void* u1 _U_, const char* strptr, guint len, const void* u2 _U_, const void* u3 _U_, const char** err) { \
guint i; for (i=0;i<len;i++) { \
char c = strptr[i]; \
if (! what((int)c)) { \
@@ -350,7 +350,7 @@ gboolean uat_fld_chk_str_ ## what (void* u1 _U_, const char* strptr, unsigned le
* a simple c-string contained in (((rec_t*)rec)->(field_name))
*/
#define UAT_CSTRING_CB_DEF(basename,field_name,rec_t) \
-static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, unsigned len, const void* u1 _U_, const void* u2 _U_) {\
+static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, guint len, const void* u1 _U_, const void* u2 _U_) {\
char* new_buf = g_strndup(buf,len); \
g_free((((rec_t*)rec)->field_name)); \
(((rec_t*)rec)->field_name) = new_buf; } \
@@ -398,7 +398,7 @@ static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out
* LSTRING MACROS
*/
#define UAT_LSTRING_CB_DEF(basename,field_name,rec_t,ptr_element,len_element) \
-static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, unsigned len, const void* u1 _U_, const void* u2 _U_) {\
+static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, guint len, const void* u1 _U_, const void* u2 _U_) {\
char* new_val = uat_unesc(buf,len,&(((rec_t*)rec)->len_element)); \
g_free((((rec_t*)rec)->ptr_element)); \
(((rec_t*)rec)->ptr_element) = new_val; }\
@@ -420,7 +420,7 @@ static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out
* XXX: UNTESTED and probably BROKEN
*/
#define UAT_BUFFER_CB_DEF(basename,field_name,rec_t,ptr_element,len_element) \
-static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, unsigned len, const void* u1 _U_, const void* u2 _U_) {\
+static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, guint len, const void* u1 _U_, const void* u2 _U_) {\
char* new_buf = len ? g_memdup(buf,len) : NULL; \
g_free((((rec_t*)rec)->ptr_element)); \
(((rec_t*)rec)->ptr_element) = new_buf; \
@@ -438,7 +438,7 @@ static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out
* a decimal number contained in
*/
#define UAT_DEC_CB_DEF(basename,field_name,rec_t) \
-static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, unsigned len, const void* u1 _U_, const void* u2 _U_) {\
+static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, guint len, const void* u1 _U_, const void* u2 _U_) {\
((rec_t*)rec)->field_name = (guint)strtol(ep_strndup(buf,len),NULL,10); } \
static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out_ptr, unsigned* out_len, const void* u1 _U_, const void* u2 _U_) {\
*out_ptr = ep_strdup_printf("%d",((rec_t*)rec)->field_name); \
@@ -453,7 +453,7 @@ static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out
* an hexadecimal number contained in
*/
#define UAT_HEX_CB_DEF(basename,field_name,rec_t) \
-static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, unsigned len, const void* u1 _U_, const void* u2 _U_) {\
+static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, guint len, const void* u1 _U_, const void* u2 _U_) {\
((rec_t*)rec)->field_name = (guint)strtol(ep_strndup(buf,len),NULL,16); } \
static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out_ptr, unsigned* out_len, const void* u1 _U_, const void* u2 _U_) {\
*out_ptr = ep_strdup_printf("%x",((rec_t*)rec)->field_name); \
@@ -471,7 +471,7 @@ static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out
* value
*/
#define UAT_VS_DEF(basename,field_name,rec_t,default_val,default_str) \
-static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, unsigned len, const void* vs, const void* u2 _U_) {\
+static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, guint len, const void* vs, const void* u2 _U_) {\
guint i; \
char* str = ep_strndup(buf,len); \
const char* cstr; ((rec_t*)rec)->field_name = default_val; \
@@ -488,7 +488,7 @@ static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out
*out_len = (unsigned)strlen(*out_ptr); return; } } }
#define UAT_VS_CSTRING_DEF(basename,field_name,rec_t,default_val,default_str) \
-static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, unsigned len, const void* vs, const void* u2 _U_) {\
+static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, guint len, const void* vs, const void* u2 _U_) {\
guint i; \
char* str = ep_strndup(buf,len); \
const char* cstr; ((rec_t*)rec)->field_name = default_val; \
@@ -511,7 +511,7 @@ static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out
*/
#define UAT_PROTO_DEF(basename, field_name, dissector_field, name_field, rec_t) \
-static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, unsigned len, const void* u1 _U_, const void* u2 _U_) {\
+static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, guint len, const void* u1 _U_, const void* u2 _U_) {\
if (len) { \
gchar *tmp = g_strndup(buf,len); \
((rec_t*)rec)->name_field = g_ascii_strdown(tmp, -1); \
@@ -538,7 +538,7 @@ static void basename ## _ ## field_name ## _tostr_cb(void* rec, const char** out
*/
#define UAT_RANGE_CB_DEF(basename,field_name,rec_t) \
-static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, unsigned len, const void* u1 _U_, const void* u2) {\
+static void basename ## _ ## field_name ## _set_cb(void* rec, const char* buf, guint len, const void* u1 _U_, const void* u2) {\
char* rng = ep_strndup(buf,len);\
range_convert_str(&(((rec_t*)rec)->field_name), rng,GPOINTER_TO_UINT(u2)); \
} \