From: Guy Harris Date: Fri, 30 Nov 2012 07:39:43 +0000 (-0800) Subject: Fix some more NAME_MAX->PATH_MAX and make some routines static. X-Git-Tag: tcpdump-4.4.0~12 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/79c1ad174fca6e66351564cd5ffd632a541b8aed Fix some more NAME_MAX->PATH_MAX and make some routines static. --- diff --git a/tcpdump.c b/tcpdump.c index e47b95f2..bca67f1e 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -632,7 +632,9 @@ static int tcpdump_printf(netdissect_options *ndo _U_, return ret; } -struct print_info get_print_info(int type) { +static struct print_info +get_print_info(int type) +{ struct print_info printinfo; printinfo.ndo_type = 1; @@ -653,10 +655,12 @@ struct print_info get_print_info(int type) { return (printinfo); } -char *get_next_file(FILE *VFile, char *ptr) { +static char * +get_next_file(FILE *VFile, char *ptr) +{ char *ret; - ret = fgets(ptr, NAME_MAX, VFile); + ret = fgets(ptr, PATH_MAX, VFile); if (!ret) return NULL; @@ -685,7 +689,7 @@ main(int argc, char **argv) struct dump_info dumpinfo; u_char *pcap_userdata; char ebuf[PCAP_ERRBUF_SIZE]; - char VFileLine[NAME_MAX + 1]; + char VFileLine[PATH_MAX + 1]; char *username = NULL; char *chroot_dir = NULL; char *ret = NULL;