diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-07-09 00:53:17 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-07-09 00:53:17 +0000 |
commit | 9cb86fda9cd916415d7852c1dbfdac6ef05e42ec (patch) | |
tree | 46c05f01afc72970868fef1d1fe412fde89ce251 /epan/dissectors/packet-nlm.c | |
parent | da80656d0e18aa01a8e0b1f7850b310233e623d3 (diff) |
Squelch various signed vs. unsigned warnings by:
making pointers to byte data be "guint8 *" rather than "char *",
and making buffers holding byte data arrays of "guint8" rather
than arrays of "char";
making pointers to text strings "char *" rather than "guchar *";
appropriately casting pointers (cast to "guint8 *" when passing
to routines expecting "guint8 *" or when assigning to "guint8
*");
making port-number preferences "guint";
making enum preferences "gint";
making hf_ variables "int".
Clean up white space.
svn path=/trunk/; revision=14884
Diffstat (limited to 'epan/dissectors/packet-nlm.c')
-rw-r--r-- | epan/dissectors/packet-nlm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-nlm.c b/epan/dissectors/packet-nlm.c index d5056529ea..5727c0622a 100644 --- a/epan/dissectors/packet-nlm.c +++ b/epan/dissectors/packet-nlm.c @@ -108,7 +108,7 @@ typedef struct _nlm_msg_res_unmatched_data { int req_frame; nstime_t ns; int cookie_len; - const char *cookie; + const guint8 *cookie; } nlm_msg_res_unmatched_data; typedef struct _nlm_msg_res_matched_data { @@ -168,7 +168,7 @@ nlm_msg_res_unmatched_equal(gconstpointer k1, gconstpointer k2) return 0; } - return( !memcmp(umd1->cookie, umd2->cookie, umd1->cookie_len)); + return( memcmp(umd1->cookie, umd2->cookie, umd1->cookie_len) == 0); } static gint nlm_msg_res_matched_equal(gconstpointer k1, gconstpointer k2) @@ -271,7 +271,7 @@ nlm_register_unmatched_res(packet_info *pinfo, tvbuff_t *tvb, int offset) nlm_msg_res_unmatched_data *old_umd; umd.cookie_len=tvb_get_ntohl(tvb, offset); - umd.cookie=(const char *)tvb_get_ptr(tvb, offset+4, -1); + umd.cookie=tvb_get_ptr(tvb, offset+4, -1); /* have we seen this cookie before? */ old_umd=g_hash_table_lookup(nlm_msg_res_unmatched, (gconstpointer)&umd); |