return FALSE;
/* Parse the header */
- pkt_len = parse_netscreen_rec_hdr(&wth->phdr, line, cap_int, &cap_dir, cap_dst,
- err, err_info);
+ pkt_len = parse_netscreen_rec_hdr(&wth->phdr, line, cap_int, &cap_dir,
+ cap_dst, err, err_info);
if (pkt_len == -1)
return FALSE;
/* Used to read packets in random-access fashion */
static gboolean
netscreen_seek_read(wtap *wth, gint64 seek_off,
- struct wtap_pkthdr *phdr, Buffer *buf, int len,
+ struct wtap_pkthdr *phdr, Buffer *buf, int len _U_,
int *err, gchar **err_info)
{
+ int pkt_len;
char line[NETSCREEN_LINE_LENGTH];
char cap_int[NETSCREEN_MAX_INT_NAME_LENGTH];
gboolean cap_dir;
return FALSE;
}
- if (parse_netscreen_rec_hdr(phdr, line, cap_int, &cap_dir, cap_dst,
- err, err_info) == -1) {
+ pkt_len = parse_netscreen_rec_hdr(phdr, line, cap_int, &cap_dir,
+ cap_dst, err, err_info);
+ if (pkt_len == -1)
return FALSE;
- }
- if (!parse_netscreen_hex_dump(wth->random_fh, len, cap_int, cap_dst,
- phdr, buf, err, err_info))
+ if (!parse_netscreen_hex_dump(wth->random_fh, pkt_len, cap_int,
+ cap_dst, phdr, buf, err, err_info))
return FALSE;
return TRUE;
}