From: Simon Wilkinson Date: Mon, 14 Sep 2009 12:49:22 +0000 (+0100) Subject: Remove unecessary initialisation X-Git-Tag: openafs-devel-1_5_64~17 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=8af8af05f0a87af154f11bc8a7a7ec3f2505291e Remove unecessary initialisation We already memset av to contain all 0s, therefore we don't need to initialise individual elements to 0 as well. Inspired by Rainer Toebbicke's patch for RT 125355 (which is 1.4.x only) Reviewed-on: http://gerrit.openafs.org/456 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- diff --git a/src/afs/afs_osi_pag.c b/src/afs/afs_osi_pag.c index 212843a..ab05911 100644 --- a/src/afs/afs_osi_pag.c +++ b/src/afs/afs_osi_pag.c @@ -431,19 +431,12 @@ afs_InitReq(register struct vrequest *av, AFS_UCRED *acred) #if defined(AFS_LINUX26_ENV) && !defined(AFS_NONFSTRANS) int code; #endif - int i = 0; AFS_STATCNT(afs_InitReq); memset(av, 0, sizeof(*av)); if (afs_shuttingdown) return EIO; - av->idleError = 0; - av->tokenError = 0; - while (i < MAXHOSTS) { - av->skipserver[i] = 0; - i++; - } #ifdef AFS_LINUX26_ENV #if !defined(AFS_NONFSTRANS) if (osi_linux_nfs_initreq(av, acred, &code)) @@ -469,7 +462,6 @@ afs_InitReq(register struct vrequest *av, AFS_UCRED *acred) av->uid = acred->cr_ruid; /* default when no pag is set */ #endif } - av->initd = 0; return 0; }