diff options
author | stefanf <stefanf@FreeBSD.org> | 2005-04-08 21:24:23 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2005-04-08 21:24:23 +0000 |
commit | d1df2201c097db70f97e5d3b21f3ebd30420f024 (patch) | |
tree | 1f1257523e18e468de19609045ca895488c80d7a | |
parent | edc96e2497266ee829656e86d25b59c03c64d27c (diff) | |
download | FreeBSD-src-d1df2201c097db70f97e5d3b21f3ebd30420f024.zip FreeBSD-src-d1df2201c097db70f97e5d3b21f3ebd30420f024.tar.gz |
Remove unused variables and assignments.
-rw-r--r-- | lib/libc/gen/fnmatch.c | 1 | ||||
-rw-r--r-- | lib/libc/net/getifmaddrs.c | 4 | ||||
-rw-r--r-- | lib/libc/net/res_comp.c | 4 | ||||
-rw-r--r-- | 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 3c3377f..f041df8 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 40475ae..adbc4a5 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 ef99c22..2e22483 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 6751338..4892235 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; |