/* XXX - the only reason why we limit it to <= INT_MAX is so that it fits in p->snapshot, and the only reason that p->snapshot is signed is that pcap_snapshot() returns an int, not an unsigned int.  */
bpf_u_int32 pcap_adjust_snapshot(bpf_u_int32 linktype, bpf_u_int32 snaplen)
/* XXX - the only reason why we limit it to <= INT_MAX is so that it fits in p->snapshot, and the only reason that p->snapshot is signed is that pcap_snapshot() returns an int, not an unsigned int.  */
bpf_u_int32 pcap_adjust_snapshot(bpf_u_int32 linktype, bpf_u_int32 snaplen)
{
	if (snaplen == 0 || snaplen > INT_MAX) {
		snaplen = max_snaplen_for_dlt(linktype);
	}
	return snaplen;
}