diff options
author | fenner <fenner@FreeBSD.org> | 1998-09-15 19:36:32 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 1998-09-15 19:36:32 +0000 |
commit | cfc42b58f229425374e675f86614cf26ffa356e4 (patch) | |
tree | 6bd786e664682d3877b9cca3efa525ac67d8e005 /contrib/tcpdump/parsenfsfh.c | |
parent | a9b9c86c8a0ccde5c1480bf5a0ba250d949a6d65 (diff) | |
download | FreeBSD-src-cfc42b58f229425374e675f86614cf26ffa356e4.zip FreeBSD-src-cfc42b58f229425374e675f86614cf26ffa356e4.tar.gz |
Virgin import of LBL tcpdump v3.4
Diffstat (limited to 'contrib/tcpdump/parsenfsfh.c')
-rw-r--r-- | contrib/tcpdump/parsenfsfh.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/contrib/tcpdump/parsenfsfh.c b/contrib/tcpdump/parsenfsfh.c index 9746672..d7969bb 100644 --- a/contrib/tcpdump/parsenfsfh.c +++ b/contrib/tcpdump/parsenfsfh.c @@ -9,14 +9,16 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: parsenfsfh.c,v 1.12 96/12/10 23:25:50 leres Exp $ (LBL)"; + "@(#) $Header: parsenfsfh.c,v 1.14 97/06/15 13:20:27 leres Exp $ (LBL)"; #endif #include <sys/types.h> #include <sys/time.h> #include <ctype.h> +#ifdef HAVE_MEMORY_H #include <memory.h> +#endif #include <stdio.h> #include <string.h> @@ -312,13 +314,14 @@ int ourself; /* true if file handle was generated on this host */ if (sizeof(*fsidp) >= 14) { if (sizeof(*fsidp) > 14) memset((char *)fsidp, 0, sizeof(*fsidp)); - memcpy((char *)fsidp, fh, 14); /* just use the whole thing */ + /* just use the whole thing */ + memcpy((char *)fsidp, (char *)fh, 14); } else { u_int32_t tempa[4]; /* at least 16 bytes, maybe more */ memset((char *)tempa, 0, sizeof(tempa)); - memcpy((char *)tempa, fh, 14); /* ensure alignment */ + memcpy((char *)tempa, (char *)fh, 14); /* ensure alignment */ fsidp->Fsid_dev.Minor = tempa[0] + (tempa[1]<<1); fsidp->Fsid_dev.Major = tempa[2] + (tempa[3]<<1); fsidp->fsid_code = 0; |