forked from osmocom/wireshark
Some types of addresses are data structures; make the address data
pointer in an address structure a "void *", to indicate that it can point to some arbitrary type of object, rather than a "guint8 *", which indicates that it points to an array of bytes. For any address type where the address is a structure, this removes some alignment warnings; the author of the code to handle a particular address type has the responsibility of making sure you don't set up the address structure with misaligned data. (Yes, it matters, at least on SPARC.) svn path=/trunk/; revision=21563
This commit is contained in:
parent
cde0384abc
commit
c3ac6f1e71
|
@ -60,13 +60,13 @@ typedef enum {
|
|||
typedef struct _address {
|
||||
address_type type; /* type of address */
|
||||
int len; /* length of address, in bytes */
|
||||
const guint8 *data; /* bytes that constitute address */
|
||||
const void *data; /* pointer to address data */
|
||||
} address;
|
||||
|
||||
#define SET_ADDRESS(addr, addr_type, addr_len, addr_data) { \
|
||||
(addr)->type = (addr_type); \
|
||||
(addr)->len = (addr_len); \
|
||||
(addr)->data = (const void *)(addr_data); \
|
||||
(addr)->data = (addr_data); \
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue