From 18b51f792fb28f3909a1e3a6b44898572b9afdcf Mon Sep 17 00:00:00 2001 From: Stefan Farfeleder Date: Sat, 9 Apr 2005 14:59:10 +0000 Subject: [PATCH] Remove unused variables. --- usr.sbin/mountd/mountd.c | 2 -- usr.sbin/pstat/pstat.c | 2 -- usr.sbin/pw/cpdir.c | 5 +---- usr.sbin/quot/quot.c | 4 +--- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 8b03e13d59dc..54dfd6970572 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -568,7 +568,6 @@ mntsrv(rqstp, transp) struct fhreturn fhr; struct stat stb; struct statfs fsb; - struct addrinfo *ai; char host[NI_MAXHOST], numerichost[NI_MAXHOST]; int lookup_failed = 1; struct sockaddr *saddr; @@ -595,7 +594,6 @@ mntsrv(rqstp, transp) NULL, 0, 0); getnameinfo(saddr, saddr->sa_len, numerichost, sizeof numerichost, NULL, 0, NI_NUMERICHOST); - ai = NULL; switch (rqstp->rq_proc) { case NULLPROC: if (!svc_sendreply(transp, (xdrproc_t)xdr_void, NULL)) diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index ca786376de28..519f4d8bb37a 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -336,7 +336,6 @@ static void ttyprt(struct xtty *xt) { int i, j; - pid_t pgid; char *name, state[20]; if (xt->xt_size != sizeof *xt) @@ -357,7 +356,6 @@ ttyprt(struct xtty *xt) state[j++] = '-'; state[j] = '\0'; (void)printf("%-6s %8d", state, xt->xt_sid); - pgid = 0; (void)printf("%6d ", xt->xt_pgid); switch (xt->xt_line) { case TTYDISC: diff --git a/usr.sbin/pw/cpdir.c b/usr.sbin/pw/cpdir.c index d8fa42bab61f..1eba348f4dc0 100644 --- a/usr.sbin/pw/cpdir.c +++ b/usr.sbin/pw/cpdir.c @@ -46,7 +46,6 @@ static const char rcsid[] = void copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid) { - int rc = 0; char src[MAXPATHLEN]; char dst[MAXPATHLEN]; @@ -61,9 +60,7 @@ copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid ++counter; chown(dir, uid, gid); - if (skel == NULL || *skel == '\0') - rc = 1; - else { + if (skel != NULL && *skel != '\0') { DIR *d = opendir(skel); if (d != NULL) { diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 75e758b076fd..42e8f48021bd 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -477,7 +477,7 @@ donames(fd, super, name) char *name; { int c; - ino_t inode, inode1; + ino_t inode; ino_t maxino; union dinode *dp; @@ -486,7 +486,6 @@ donames(fd, super, name) while ((c = getchar()) != EOF && (c < '0' || c > '9')) while ((c = getchar()) != EOF && c != '\n'); ungetc(c,stdin); - inode1 = -1; while (scanf("%u",&inode) == 1) { if (inode > maxino) { warnx("illegal inode %d",inode); @@ -504,7 +503,6 @@ donames(fd, super, name) c = getchar(); } putchar('\n'); - inode1 = inode; } else { if (errno) { err(1, "%s", name);