diff options
author | 2007-05-16 04:14:23 +0000 | |
---|---|---|
committer | 2007-05-16 04:14:23 +0000 | |
commit | b756865fcb2acd6519009163c2065d316e9ecc39 (patch) | |
tree | 63dca875e6e698473d75821e1499ebcb147e14f4 | |
parent | Add missing ssize_t rlen, used when DEBUG is defined, and only (diff) | |
download | wireguard-openbsd-b756865fcb2acd6519009163c2065d316e9ecc39.tar.xz wireguard-openbsd-b756865fcb2acd6519009163c2065d316e9ecc39.zip |
Wrap some functions, labels, and variables in #ifdefs corresponding
to #ifdefs where they are used. Found by lint by bret dot lambert
at gmail.
OK deraadt@.
-rw-r--r-- | lib/libc/gen/getgrent.c | 4 | ||||
-rw-r--r-- | lib/libc/net/gethostnamadr.c | 6 | ||||
-rw-r--r-- | lib/libc/net/res_query.c | 4 |
3 files changed, 11 insertions, 3 deletions
diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index fc9036ce599..124a4034cee 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getgrent.c,v 1.23 2005/08/08 08:05:34 espie Exp $ */ +/* $OpenBSD: getgrent.c,v 1.24 2007/05/16 04:14:23 ray Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -426,7 +426,9 @@ parse: p_gr->gr_gid = ul; if (search && name == NULL && p_gr->gr_gid != gid) continue; +#ifdef YP found_it: +#endif cp = NULL; if (bp == NULL) continue; diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c index cae27910d09..66d7e5ccd40 100644 --- a/lib/libc/net/gethostnamadr.c +++ b/lib/libc/net/gethostnamadr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gethostnamadr.c,v 1.70 2007/02/18 20:38:28 ray Exp $ */ +/* $OpenBSD: gethostnamadr.c,v 1.71 2007/05/16 04:14:23 ray Exp $ */ /*- * Copyright (c) 1985, 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -499,7 +499,9 @@ gethostbyname2(const char *name, int af) struct hostent *hp; char lookups[MAXDNSLUS]; extern struct hostent *_gethtbyname2(const char *, int); +#ifdef YP extern struct hostent *_yp_gethtbyname(const char *); +#endif if (_res_init(0) == -1) return (_gethtbyname2(name, af)); @@ -647,7 +649,9 @@ gethostbyaddr(const void *addr, socklen_t len, int af) char lookups[MAXDNSLUS]; struct hostent *res; extern struct hostent *_gethtbyaddr(const void *, socklen_t, int); +#ifdef YP extern struct hostent *_yp_gethtbyaddr(const void *); +#endif if (_res_init(0) == -1) { res = _gethtbyaddr(addr, len, af); diff --git a/lib/libc/net/res_query.c b/lib/libc/net/res_query.c index 32cd04306cb..c8a45a5df5b 100644 --- a/lib/libc/net/res_query.c +++ b/lib/libc/net/res_query.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_query.c,v 1.24 2005/08/06 20:30:04 espie Exp $ */ +/* $OpenBSD: res_query.c,v 1.25 2007/05/16 04:14:23 ray Exp $ */ /* * ++Copyright++ 1988, 1993 @@ -318,7 +318,9 @@ res_querydomain(const char *name, u_char *answer, /* buffer to put answer */ int anslen) /* size of answer */ { +#ifdef DEBUG struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res); +#endif char nbuf[MAXDNAME*2+1+1]; const char *longname = nbuf; int n; |