X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/95be1abb3574f6fc9bdd5c90ff7073295ee07de7..c4521bbf470420aa57fa5f252bcf3576318ace87:/smbutil.c diff --git a/smbutil.c b/smbutil.c index 3b72d86f..bcea660e 100644 --- a/smbutil.c +++ b/smbutil.c @@ -50,7 +50,7 @@ static void interpret_dos_date(uint32 date,int *year,int *month,int *day,int *ho /******************************************************************* create a unix date from a dos date ********************************************************************/ -static time_t make_unix_date(void *date_ptr) +static time_t make_unix_date(const void *date_ptr) { uint32 dos_date=0; struct tm t; @@ -71,7 +71,7 @@ static time_t make_unix_date(void *date_ptr) /******************************************************************* create a unix date from a dos date ********************************************************************/ -static time_t make_unix_date2(void *date_ptr) +static time_t make_unix_date2(const void *date_ptr) { uint32 x,x2; @@ -86,7 +86,7 @@ static time_t make_unix_date2(void *date_ptr) interpret an 8 byte "filetime" structure to a time_t It's originally in "100ns units since jan 1st 1601" ****************************************************************************/ -static time_t interpret_long_date(char *p) +static time_t interpret_long_date(const char *p) { double d; time_t ret; @@ -167,9 +167,9 @@ static int name_extract(char *buf,int ofs,char *name) /**************************************************************************** return the total storage length of a mangled name ****************************************************************************/ -static int name_len(unsigned char *s) +static int name_len(const unsigned char *s) { - char *s0 = s; + const char *s0 = s; unsigned char c = *(unsigned char *)s; if ((c & 0xC0) == 0xC0) return(2); @@ -177,7 +177,7 @@ static int name_len(unsigned char *s) return(PTR_DIFF(s,s0)+1); } -static void print_asc(unsigned char *buf,int len) +static void print_asc(const unsigned char *buf,int len) { int i; for (i=0;i