cachemgr-setuerror-ifdef-cleanup-20020827
[openafs.git] / src / afs / afs_nfsclnt.c
index 950e80b..42725d1 100644 (file)
@@ -72,9 +72,9 @@ register afs_int32 uid, host;
        }
     }
     np = (struct nfsclientpag *) afs_osi_Alloc(sizeof (struct nfsclientpag));
-    bzero((char *)np, sizeof(struct nfsclientpag));
+    memset((char *)np, 0, sizeof(struct nfsclientpag));
     /* Copy the necessary afs_exporter fields */
-    bcopy((char *)afs_nfsexporter, (char *)np, sizeof(struct afs_exporter));
+    memcpy((char *)np, (char *)afs_nfsexporter, sizeof(struct afs_exporter));
     np->next = afs_nfspags[i];
     afs_nfspags[i] = np;
     np->uid = uid;
@@ -134,7 +134,7 @@ register afs_int32 uid, host, pag;
        }
     }
     MReleaseWriteLock(&afs_xnfspag);
-    return (struct nfsclientpag *) 0;
+    return NULL;
 }
 
 
@@ -152,7 +152,7 @@ afs_nfsclient_init() {
 
        init_nfsexporter = 1;
        LOCK_INIT(&afs_xnfspag, "afs_xnfspag");
-       afs_nfsexported = exporter_add(0, &nfs_exportops, EXP_EXPORTED, EXP_NFS, (char *)0);
+       afs_nfsexported = exporter_add(0, &nfs_exportops, EXP_EXPORTED, EXP_NFS, NULL);
     }
 }
 
@@ -193,7 +193,7 @@ afs_int32 *pagparam;
                if (!au->exporter) {
                    pag = NOPAG;
                    afs_PutUser(au, READ_LOCK);
-                   au = (struct unixuser *)0;
+                   au = NULL;
                }
            } else 
                pag = NOPAG;    /*  No unixuser struct so pag not trusted  */
@@ -212,7 +212,7 @@ afs_int32 *pagparam;
 #endif
            if (au) afs_PutUser(au, READ_LOCK);
 /*         ReleaseWriteLock(&afs_xnfsreq);             */
-#if    !defined(AFS_SUN5_ENV) && !defined(AFS_OSF_ENV) && !defined(AFS_SGI64_ENV)
+#if defined(KERNEL_HAVE_SETUERROR)
            setuerror(code);
 #endif
            return (code);
@@ -228,7 +228,7 @@ afs_int32 *pagparam;
 #endif
                afs_PutNfsClientPag(np);
 /*             ReleaseWriteLock(&afs_xnfsreq); */
-#if    !defined(AFS_SUN5_ENV) && !defined(AFS_OSF_ENV) && !defined(AFS_SGI64_ENV)
+#if defined(KERNEL_HAVE_SETUERROR)
                setuerror(code);
 #endif
                return (code);
@@ -245,7 +245,7 @@ afs_int32 *pagparam;
                    afs_PutNfsClientPag(np);
                    afs_PutUser(au, READ_LOCK);
                    /*      ReleaseWriteLock(&afs_xnfsreq);     */
-#if    !defined(AFS_SUN5_ENV) && !defined(AFS_OSF_ENV) && !defined(AFS_SGI64_ENV)
+#if defined(KERNEL_HAVE_SETUERROR)
                    setuerror(code);
 #endif
                    return (code);