aboutsummaryrefslogtreecommitdiffstats
path: root/pcapio.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2009-04-26 22:27:46 +0000
committerGuy Harris <guy@alum.mit.edu>2009-04-26 22:27:46 +0000
commitb8b67161c8b2755644a311c846e234e501653682 (patch)
treecba3a83ce6f4e004e8aa3381d3b76246f8399b2d /pcapio.c
parentcaff2f7cd4da9f46118f955b3167978c050338f8 (diff)
More casts to deal with 64-bit size_t.
svn path=/trunk/; revision=28167
Diffstat (limited to 'pcapio.c')
-rw-r--r--pcapio.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/pcapio.c b/pcapio.c
index b11dad00ca..d7fd562d88 100644
--- a/pcapio.c
+++ b/pcapio.c
@@ -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;