diff options
author | Gerald Combs <gerald@wireshark.org> | 2009-03-10 17:38:24 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2009-03-10 17:38:24 +0000 |
commit | 51cf6961425de962c408b7b718e96c011fa3660a (patch) | |
tree | 6e7093c1ca62e15de31d9de19543ba1b40452fbd /wiretap/ngsniffer.c | |
parent | 71404bd6557842e8aa5e0da65997d5c3b7a6d191 (diff) |
Another iteration of 64-bit-support-by-successive-approximation.
svn path=/trunk/; revision=27690
Diffstat (limited to 'wiretap/ngsniffer.c')
-rw-r--r-- | wiretap/ngsniffer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c index a30c8ab7b3..cc905c6e43 100644 --- a/wiretap/ngsniffer.c +++ b/wiretap/ngsniffer.c @@ -485,7 +485,7 @@ static gboolean ngsniffer_read_frame6(wtap *wth, gboolean is_random, static void set_pseudo_header_frame6(wtap *wth, union wtap_pseudo_header *pseudo_header, struct frame6_rec *frame6); static gboolean ngsniffer_read_rec_data(wtap *wth, gboolean is_random, - guchar *pd, int length, int *err); + guchar *pd, size_t length, int *err); static int infer_pkt_encap(const guint8 *pd, int len); static int fix_pseudo_header(int encap, const guint8 *pd, int len, union wtap_pseudo_header *pseudo_header); @@ -1725,13 +1725,13 @@ static void set_pseudo_header_frame6(wtap *wth, } static gboolean ngsniffer_read_rec_data(wtap *wth, gboolean is_random, - guchar *pd, int length, int *err) + guchar *pd, size_t length, int *err) { gint64 bytes_read; bytes_read = ng_file_read(pd, 1, length, wth, is_random, err); - if (bytes_read != length) { + if (bytes_read != (gint64) length) { if (*err == 0) *err = WTAP_ERR_SHORT_READ; return FALSE; @@ -2425,7 +2425,7 @@ ng_file_read(void *buffer, size_t elementsize, size_t numelements, wtap *wth, if (wth->file_type == WTAP_FILE_NGSNIFFER_UNCOMPRESSED) { errno = WTAP_ERR_CANT_READ; copied_bytes = file_read(buffer, 1, copybytes, infile); - if (copied_bytes != copybytes) + if ((size_t) copied_bytes != copybytes) *err = file_error(infile); return copied_bytes; } @@ -2543,7 +2543,7 @@ read_blob(FILE_T infile, ngsniffer_comp_stream_t *comp_stream, int *err) /* Read the blob */ errno = WTAP_ERR_CANT_READ; read_len = file_read(file_inbuf, 1, in_len, infile); - if (in_len != read_len) { + if ((size_t) in_len != read_len) { *err = file_error(infile); return -1; } |