From cf00abe99305cc6c09c14d3b21e6971c0617a183 Mon Sep 17 00:00:00 2001 From: Stefan Farfeleder Date: Fri, 8 Apr 2005 21:24:23 +0000 Subject: [PATCH] Remove unused variables and assignments. --- lib/libc/gen/fnmatch.c | 1 - lib/libc/net/getifmaddrs.c | 4 ---- lib/libc/net/res_comp.c | 4 ++-- lib/libc/net/res_mkupdate.c | 3 +-- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c index 3c3377f570a9..f041df826432 100644 --- a/lib/libc/gen/fnmatch.c +++ b/lib/libc/gen/fnmatch.c @@ -254,7 +254,6 @@ rangematch(pattern, test, flags, newp, patmbs) } else if (*pattern == '\0') { return (RANGE_ERROR); } else if (*pattern == '/' && (flags & FNM_PATHNAME)) { - pattern++; return (RANGE_NOMATCH); } else if (*pattern == '\\' && !(flags & FNM_NOESCAPE)) pattern++; diff --git a/lib/libc/net/getifmaddrs.c b/lib/libc/net/getifmaddrs.c index 40475ae19fed..adbc4a5dde6e 100644 --- a/lib/libc/net/getifmaddrs.c +++ b/lib/libc/net/getifmaddrs.c @@ -60,14 +60,12 @@ getifmaddrs(struct ifmaddrs **pif) int icnt = 1; int dcnt = 0; int ntry = 0; - u_short idx = 0; size_t len; size_t needed; int mib[6]; int i; char *buf; char *data; - char *names; char *next; char *p; struct ifma_msghdr *ifmam; @@ -128,12 +126,10 @@ getifmaddrs(struct ifmaddrs **pif) ifa = (struct ifmaddrs *)(void *)data; data += sizeof(struct ifmaddrs) * icnt; - names = data + dcnt; memset(ifa, 0, sizeof(struct ifmaddrs) * icnt); ift = ifa; - idx = 0; for (next = buf; next < buf + needed; next += rtm->rtm_msglen) { rtm = (struct rt_msghdr *)(void *)next; if (rtm->rtm_version != RTM_VERSION) diff --git a/lib/libc/net/res_comp.c b/lib/libc/net/res_comp.c index ef99c2233522..2e2248312b9b 100644 --- a/lib/libc/net/res_comp.c +++ b/lib/libc/net/res_comp.c @@ -158,7 +158,7 @@ int res_hnok(dn) const char *dn; { - int ppch = '\0', pch = PERIOD, ch = *dn++; + int pch = PERIOD, ch = *dn++; while (ch != '\0') { int nch = *dn++; @@ -175,7 +175,7 @@ res_hnok(dn) if (!middlechar(ch)) return (0); } - ppch = pch, pch = ch, ch = nch; + pch = ch, ch = nch; } return (1); } diff --git a/lib/libc/net/res_mkupdate.c b/lib/libc/net/res_mkupdate.c index 67513389de30..489223559921 100644 --- a/lib/libc/net/res_mkupdate.c +++ b/lib/libc/net/res_mkupdate.c @@ -62,7 +62,7 @@ int res_mkupdate(ns_updrec *rrecp_in, u_char *buf, int buflen) { ns_updrec *rrecp_start = rrecp_in; HEADER *hp; - u_char *cp, *sp1, *sp2, *startp, *endp; + u_char *cp, *sp2, *startp, *endp; int n, i, soanum, multiline; ns_updrec *rrecp; struct in_addr ina; @@ -87,7 +87,6 @@ res_mkupdate(ns_updrec *rrecp_in, u_char *buf, int buflen) { hp->id = htons(++_res.id); hp->opcode = ns_o_update; hp->rcode = NOERROR; - sp1 = buf + 2*INT16SZ; /* save pointer to zocount */ cp = buf + HFIXEDSZ; buflen -= HFIXEDSZ; dpp = dnptrs;