diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-04-25 19:28:56 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-04-25 19:28:56 +0000 |
commit | c3ac6f1e71a45693d47b569091f3ee86f0f3d0ba (patch) | |
tree | 9c2c2ed76a45c565d7038e81ddd7b3d6c2bb4a89 /epan | |
parent | cde0384abcb7211579ec619b7396b10f40bac5a6 (diff) |
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
Diffstat (limited to 'epan')
-rw-r--r-- | epan/address.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/address.h b/epan/address.h index 551d4af0e3..a47046fd54 100644 --- a/epan/address.h +++ b/epan/address.h @@ -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); \ } /* |