return 0;
}
- srcfc = (guint8 *)pinfo->src.data;
+ srcfc = (const guint8 *)pinfo->src.data;
if (srcfc[2]) {
/* If it is a loop port, we'll need to remember the ALPA */
options = NO_PORT2;
return 0;
}
- dstfc = (guint8 *)pinfo->dst.data;
+ dstfc = (const guint8 *)pinfo->dst.data;
addrdata[0] = addrdata[1] = 0;
addrdata[2] = dstfc[2];
/* Key hash function. */
guint ieee802154_short_addr_hash(gconstpointer key)
{
- return (((ieee802154_short_addr *)key)->addr) | (((ieee802154_short_addr *)key)->pan << 16);
+ return (((const ieee802154_short_addr *)key)->addr) | (((const ieee802154_short_addr *)key)->pan << 16);
}
/* Key equal function. */
gboolean ieee802154_short_addr_equal(gconstpointer a, gconstpointer b)
{
- return (((ieee802154_short_addr *)a)->pan == ((ieee802154_short_addr *)b)->pan) &&
- (((ieee802154_short_addr *)a)->addr == ((ieee802154_short_addr *)b)->addr);
+ return (((const ieee802154_short_addr *)a)->pan == ((const ieee802154_short_addr *)b)->pan) &&
+ (((const ieee802154_short_addr *)a)->addr == ((const ieee802154_short_addr *)b)->addr);
}
/* Key hash function. */
guint ieee802154_long_addr_hash(gconstpointer key)
{
- return (guint)(((ieee802154_long_addr *)key)->addr) & 0xFFFFFFFF;
+ return (guint)(((const ieee802154_long_addr *)key)->addr) & 0xFFFFFFFF;
}
/* Key equal function. */
gboolean ieee802154_long_addr_equal(gconstpointer a, gconstpointer b)
{
- return (((ieee802154_long_addr *)a)->addr == ((ieee802154_long_addr *)b)->addr);
+ return (((const ieee802154_long_addr *)a)->addr == ((const ieee802154_long_addr *)b)->addr);
}
/*FUNCTION:------------------------------------------------------
/* IPv6 source address used for strict checking */
struct e_in6_addr srcAddr;
offset += 4;
- memcpy((guint8 *)&dstAddr, (guint8 *)pinfo->dst.data, pinfo->dst.len);
- memcpy((guint8 *)&srcAddr, (guint8 *)pinfo->src.data, pinfo->src.len);
+ memcpy((guint8 *)&dstAddr, pinfo->dst.data, pinfo->dst.len);
+ memcpy((guint8 *)&srcAddr, pinfo->src.data, pinfo->src.len);
/* from RFC6554: Multicast addresses MUST NOT appear in the IPv6 Destination Address field */
if(g_ipv6_rpl_srh_strict_rfc_checking && in6_is_addr_multicast(&dstAddr)){
static int
dissect_sock_diag_netlink_reply(tvbuff_t *tvb, netlink_sock_diag_info_t *info, proto_tree *tree, int offset)
{
- proto_item *ti;
-
proto_tree_add_item(tree, &hfi_netlink_sock_diag_family, tvb, offset, 1, ENC_NA);
offset += 1;
- ti = proto_tree_add_item(tree, &hfi_netlink_sock_diag_type, tvb, offset, 1, ENC_NA);
+ /* ti = */ proto_tree_add_item(tree, &hfi_netlink_sock_diag_type, tvb, offset, 1, ENC_NA);
switch (tvb_get_guint8(tvb, offset)) {
case WS_SOCK_DGRAM:
case WS_SOCK_RAW:
switch(hi_nibble(ver_type)) {
case 3:
/* Set up the fields of the pseudo-header. */
- cksum_vec[0].ptr = (guint8 *)pinfo->src.data;
+ cksum_vec[0].ptr = (const guint8 *)pinfo->src.data;
cksum_vec[0].len = pinfo->src.len;
- cksum_vec[1].ptr = (guint8 *)pinfo->dst.data;
+ cksum_vec[1].ptr = (const guint8 *)pinfo->dst.data;
cksum_vec[1].len = pinfo->dst.len;
cksum_vec[2].ptr = (const guint8 *)&phdr;
phdr[0] = g_htonl(vrrp_len);
gint
xmpp_element_t_cmp(gconstpointer a, gconstpointer b)
{
- gint result = strcmp(((xmpp_element_t*)a)->name,((xmpp_element_t*)b)->name);
+ gint result = strcmp(((const xmpp_element_t*)a)->name,((const xmpp_element_t*)b)->name);
- if(result == 0 && ((xmpp_element_t*)a)->was_read)
+ if(result == 0 && ((const xmpp_element_t*)a)->was_read)
result = -1;
return result;
static gboolean
emem_verify_pointer_list(const emem_chunk_t *chunk_list, const void *ptr)
{
- const gchar *cptr = (gchar *)ptr;
+ const gchar *cptr = (const gchar *)ptr;
const emem_chunk_t *chunk;
for (chunk = chunk_list; chunk; chunk = chunk->next) {