dir-create-initialize-null-to-avoid-drelease-on-garbage-20020218
[openafs.git] / src / dir / dir.c
index df9fb35..4b98d16 100644 (file)
@@ -7,7 +7,11 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
+#include <afsconfig.h>
 #include <afs/param.h>
+
+RCSID("$Header$");
+
 #ifdef KERNEL
 #if !defined(UKERNEL)
 #include "../h/types.h"
@@ -20,7 +24,7 @@
 #include "../h/errno.h"
 #endif
 #include "../h/time.h"
-#if defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX20_ENV)
+#if defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV)
 #include "../h/errno.h"
 #else
 #if !defined(AFS_SUN5_ENV) && !defined(AFS_LINUX20_ENV)
 #include "../afs/sysincludes.h"
 #endif
 #ifndef AFS_SGI64_ENV
+#if defined(AFS_FBSD_ENV)
+#include "../h/lock.h"
+#include "../vm/vm.h"
+#include "../vm/vm_extern.h"
+#include "../vm/pmap.h"
+#include "../vm/vm_map.h"
+#endif /* AFS_FBSD_ENV */
 #include "../h/user.h"
 #endif /* AFS_SGI64_ENV */
 #include "../h/uio.h"
@@ -69,6 +80,7 @@
 #include "../h/mbuf.h"
 #endif
 #else /* !defined(UKERNEL) */
+#include "../afs/stds.h"
 #include "../afs/sysincludes.h"
 #endif /* !defined(UKERNEL) */
 #include "../afs/afs_osi.h"
@@ -128,7 +140,7 @@ afs_int32 *vfid; {
     int blobs, firstelt;
     register int i;
     register struct DirEntry *ep;
-    unsigned short *pp;
+    unsigned short *pp = NULL;
     register struct DirHeader *dhp;
 
     /* check name quality */