diff options
author | Michael Tüxen <tuexen@fh-muenster.de> | 2009-04-26 21:30:40 +0000 |
---|---|---|
committer | Michael Tüxen <tuexen@fh-muenster.de> | 2009-04-26 21:30:40 +0000 |
commit | 46e57a55742fb0c7428d998d1e35d2639829eece (patch) | |
tree | 4c75b8e44564deb72cdd6ed0dc3e57be8e7f4fc5 /pcapio.c | |
parent | fff39b54ee71d840333375797eeaa756d78f0183 (diff) | |
download | wireshark-46e57a55742fb0c7428d998d1e35d2639829eece.tar.gz wireshark-46e57a55742fb0c7428d998d1e35d2639829eece.tar.bz2 wireshark-46e57a55742fb0c7428d998d1e35d2639829eece.zip |
(Try to) fix the 64-bit issues.
svn path=/trunk/; revision=28164
Diffstat (limited to 'pcapio.c')
-rw-r--r-- | pcapio.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -185,7 +185,7 @@ struct option { fclose(file_pointer); \ return FALSE; \ } \ - written_length += nwritten; \ + written_length += (long)nwritten; \ } while (0); \ } @@ -279,7 +279,7 @@ libpcap_write_session_header_block(FILE *fp, const guint32 padding = 0; block_total_length = sizeof(struct shb) + - sizeof(struct option) + ADD_PADDING(strlen(appname) + 1) + + sizeof(struct option) + (guint16)(ADD_PADDING(strlen(appname) + 1)) + sizeof(struct option) + sizeof(guint32); /* write shb header */ @@ -292,7 +292,7 @@ libpcap_write_session_header_block(FILE *fp, WRITE_DATA(fp, &shb, sizeof(struct shb), *bytes_written, err); /* write shb_userappl options */ option.type = SHB_USERAPPL; - option.value_length = strlen(appname) + 1; + option.value_length = (guint16)(strlen(appname) + 1); WRITE_DATA(fp, &option, sizeof(struct option), *bytes_written, err); WRITE_DATA(fp, appname, strlen(appname) + 1, *bytes_written, err); if ((strlen(appname) + 1) % 4) { @@ -340,7 +340,7 @@ libpcap_write_interface_description_block(FILE *fp, /* write the options */ if (strlen(name) > 0) { option.type = IDB_NAME; - option.value_length = strlen(name) + 1; + option.value_length = (guint16)(strlen(name) + 1); WRITE_DATA(fp, &option, sizeof(struct option), *bytes_written, err); WRITE_DATA(fp, name, strlen(name) + 1, *bytes_written, err); if ((strlen(name) + 1) % 4) { @@ -349,7 +349,7 @@ libpcap_write_interface_description_block(FILE *fp, } if (strlen(filter) > 0) { option.type = IDB_FILTER; - option.value_length = strlen(filter) + 1; + option.value_length = (guint16)(strlen(filter) + 1); WRITE_DATA(fp, &option, sizeof(struct option), *bytes_written, err); WRITE_DATA(fp, filter, strlen(filter) + 1, *bytes_written, err); if ((strlen(filter) + 1) % 4) { |