diff options
author | ray <> | 2007-05-16 04:14:23 +0000 |
---|---|---|
committer | ray <> | 2007-05-16 04:14:23 +0000 |
commit | 87de8e8e4ecf9054b2cc206a6c1fba1c14382b10 (patch) | |
tree | d851ed750ddb78895416dec87ee74cb011877906 /src | |
parent | 2afb937f72a249a958cb80e23fbe4bf5b7b2d8d7 (diff) | |
download | openbsd-87de8e8e4ecf9054b2cc206a6c1fba1c14382b10.tar.gz openbsd-87de8e8e4ecf9054b2cc206a6c1fba1c14382b10.tar.bz2 openbsd-87de8e8e4ecf9054b2cc206a6c1fba1c14382b10.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@.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libc/net/gethostnamadr.c | 6 | ||||
-rw-r--r-- | src/lib/libc/net/res_query.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/libc/net/gethostnamadr.c b/src/lib/libc/net/gethostnamadr.c index cae27910d0..66d7e5ccd4 100644 --- a/src/lib/libc/net/gethostnamadr.c +++ b/src/lib/libc/net/gethostnamadr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: gethostnamadr.c,v 1.70 2007/02/18 20:38:28 ray Exp $ */ | 1 | /* $OpenBSD: gethostnamadr.c,v 1.71 2007/05/16 04:14:23 ray Exp $ */ |
2 | /*- | 2 | /*- |
3 | * Copyright (c) 1985, 1988, 1993 | 3 | * Copyright (c) 1985, 1988, 1993 |
4 | * The Regents of the University of California. All rights reserved. | 4 | * The Regents of the University of California. All rights reserved. |
@@ -499,7 +499,9 @@ gethostbyname2(const char *name, int af) | |||
499 | struct hostent *hp; | 499 | struct hostent *hp; |
500 | char lookups[MAXDNSLUS]; | 500 | char lookups[MAXDNSLUS]; |
501 | extern struct hostent *_gethtbyname2(const char *, int); | 501 | extern struct hostent *_gethtbyname2(const char *, int); |
502 | #ifdef YP | ||
502 | extern struct hostent *_yp_gethtbyname(const char *); | 503 | extern struct hostent *_yp_gethtbyname(const char *); |
504 | #endif | ||
503 | 505 | ||
504 | if (_res_init(0) == -1) | 506 | if (_res_init(0) == -1) |
505 | return (_gethtbyname2(name, af)); | 507 | return (_gethtbyname2(name, af)); |
@@ -647,7 +649,9 @@ gethostbyaddr(const void *addr, socklen_t len, int af) | |||
647 | char lookups[MAXDNSLUS]; | 649 | char lookups[MAXDNSLUS]; |
648 | struct hostent *res; | 650 | struct hostent *res; |
649 | extern struct hostent *_gethtbyaddr(const void *, socklen_t, int); | 651 | extern struct hostent *_gethtbyaddr(const void *, socklen_t, int); |
652 | #ifdef YP | ||
650 | extern struct hostent *_yp_gethtbyaddr(const void *); | 653 | extern struct hostent *_yp_gethtbyaddr(const void *); |
654 | #endif | ||
651 | 655 | ||
652 | if (_res_init(0) == -1) { | 656 | if (_res_init(0) == -1) { |
653 | res = _gethtbyaddr(addr, len, af); | 657 | res = _gethtbyaddr(addr, len, af); |
diff --git a/src/lib/libc/net/res_query.c b/src/lib/libc/net/res_query.c index 32cd04306c..c8a45a5df5 100644 --- a/src/lib/libc/net/res_query.c +++ b/src/lib/libc/net/res_query.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: res_query.c,v 1.24 2005/08/06 20:30:04 espie Exp $ */ | 1 | /* $OpenBSD: res_query.c,v 1.25 2007/05/16 04:14:23 ray Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * ++Copyright++ 1988, 1993 | 4 | * ++Copyright++ 1988, 1993 |
@@ -318,7 +318,9 @@ res_querydomain(const char *name, | |||
318 | u_char *answer, /* buffer to put answer */ | 318 | u_char *answer, /* buffer to put answer */ |
319 | int anslen) /* size of answer */ | 319 | int anslen) /* size of answer */ |
320 | { | 320 | { |
321 | #ifdef DEBUG | ||
321 | struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res); | 322 | struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res); |
323 | #endif | ||
322 | char nbuf[MAXDNAME*2+1+1]; | 324 | char nbuf[MAXDNAME*2+1+1]; |
323 | const char *longname = nbuf; | 325 | const char *longname = nbuf; |
324 | int n; | 326 | int n; |