From ff9c60a3c86c9891ac8420f82524e7eefe1a4d1a Mon Sep 17 00:00:00 2001 From: Jim Rees Date: Mon, 24 Nov 2003 22:09:18 +0000 Subject: [PATCH] fix-joe-beuhler-patches-20031124 minor fixes to Joe Beuhler's NT patches for non-NT --- src/butc/tcmain.c | 3 ++- src/kauth/admin_tools.c | 4 ++-- src/lwp/iomgr.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/butc/tcmain.c b/src/butc/tcmain.c index ed4d44b3e0..892e834cbe 100644 --- a/src/butc/tcmain.c +++ b/src/butc/tcmain.c @@ -975,9 +975,10 @@ WorkerBee(as, arock) if (centralLogFile) { struct stat sbuf; afs_int32 statcode; -#ifdef AFS_NT40_ENV +#ifndef AFS_NT40_ENV char path[AFSDIR_PATH_MAX]; #endif + statcode = stat(centralLogFile, &sbuf); centralLogIO = fopen(centralLogFile, "a"); if (!centralLogIO) { diff --git a/src/kauth/admin_tools.c b/src/kauth/admin_tools.c index 263ed229ad..56e6ed3356 100644 --- a/src/kauth/admin_tools.c +++ b/src/kauth/admin_tools.c @@ -1348,8 +1348,8 @@ MyBeforeProc(struct cmd_syndesc *as, char *arock) } #else /* No explicit name provided: use Unix uid. */ - struct passwd pw = getpwuid(getuid()); - if (pw == 0) { + struct passwd *pw = getpwuid(getuid()); + if (pw == NULL) { printf("Can't figure out your name from your user id.\n"); return KABADCMD; } diff --git a/src/lwp/iomgr.c b/src/lwp/iomgr.c index 84655882b4..9128930134 100644 --- a/src/lwp/iomgr.c +++ b/src/lwp/iomgr.c @@ -292,7 +292,7 @@ static int FDSetCmp(int nfds, fd_set *fd_set1, fd_set *fd_set2) */ static void FDSetSet(int nfds, fd_set *fd_set1, fd_set *fd_set2) { - unsigned int i; + unsigned int i, n; if (fd_set1 == (fd_set*)0 || fd_set2 == (fd_set*)0) return; @@ -307,7 +307,7 @@ static void FDSetSet(int nfds, fd_set *fd_set1, fd_set *fd_set2) if (nfds == 0) return; - for (i=0,n = INTS_PER_FDS(nfds); iFDS_BITS[i] |= fd_set2->FDS_BITS[i]; } #endif