diff options
author | Guy Harris <guy@alum.mit.edu> | 2009-04-26 22:27:46 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2009-04-26 22:27:46 +0000 |
commit | b8b67161c8b2755644a311c846e234e501653682 (patch) | |
tree | cba3a83ce6f4e004e8aa3381d3b76246f8399b2d /pcapio.c | |
parent | caff2f7cd4da9f46118f955b3167978c050338f8 (diff) |
More casts to deal with 64-bit size_t.
svn path=/trunk/; revision=28167
Diffstat (limited to 'pcapio.c')
-rw-r--r-- | pcapio.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -321,15 +321,17 @@ libpcap_write_interface_description_block(FILE *fp, guint32 block_total_length; const guint32 padding = 0; - block_total_length = sizeof(struct idb) + sizeof(guint32); + block_total_length = (guint32)(sizeof(struct idb) + sizeof(guint32)); if (strlen(name) > 0) { - block_total_length += sizeof(struct option) + ADD_PADDING(strlen(name) + 1); + block_total_length += + (guint32)(sizeof(struct option) + ADD_PADDING(strlen(name) + 1)); } if (strlen(filter) > 0) { - block_total_length += sizeof(struct option) + ADD_PADDING(strlen(filter) + 1); + block_total_length += + (guint32)(sizeof(struct option) + ADD_PADDING(strlen(filter) + 1)); } if ((strlen(name) > 0) || (strlen(filter) > 0)) { - block_total_length += sizeof(struct option); + block_total_length += (guint32)sizeof(struct option); } idb.block_type = INTERFACE_DESCRIPTION_BLOCK_TYPE; idb.block_total_length = block_total_length; |