diff options
author | Tim Potter <tpot@samba.org> | 2003-07-23 06:37:51 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-07-23 06:37:51 +0000 |
commit | 80b46fd6cf5b480ec5656158152b1ab33630c356 (patch) | |
tree | c77a0f9ff253ce5faf5a5baed4c8a8062cf7d435 /source3/nsswitch | |
parent | c085ace063872bc0152989ae33764341775708ad (diff) | |
download | samba-80b46fd6cf5b480ec5656158152b1ab33630c356.tar.gz samba-80b46fd6cf5b480ec5656158152b1ab33630c356.tar.bz2 samba-80b46fd6cf5b480ec5656158152b1ab33630c356.zip |
Move a function to avoid a warning.
(This used to be commit a3b4c57503e0966145b0adab247297e4c8e0f165)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/wins.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/source3/nsswitch/wins.c b/source3/nsswitch/wins.c index 62493ef0a9..87dac60192 100644 --- a/source3/nsswitch/wins.c +++ b/source3/nsswitch/wins.c @@ -86,29 +86,6 @@ static void nss_wins_init(void) load_interfaces(); } -static struct node_status *lookup_byaddr_backend(char *addr, int *count) -{ - int fd; - struct in_addr ip; - struct nmb_name nname; - struct node_status *status; - - if (!initialised) { - nss_wins_init(); - } - - fd = wins_lookup_open_socket_in(); - if (fd == -1) - return NULL; - - make_nmb_name(&nname, "*", 0); - ip = *interpret_addr2(addr); - status = node_status_query(fd,&nname,ip, count); - - close(fd); - return status; -} - static struct in_addr *lookup_byname_backend(const char *name, int *count) { int fd = -1; @@ -149,8 +126,31 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count) return ret; } - #ifdef HAVE_NS_API_H + +static struct node_status *lookup_byaddr_backend(char *addr, int *count) +{ + int fd; + struct in_addr ip; + struct nmb_name nname; + struct node_status *status; + + if (!initialised) { + nss_wins_init(); + } + + fd = wins_lookup_open_socket_in(); + if (fd == -1) + return NULL; + + make_nmb_name(&nname, "*", 0); + ip = *interpret_addr2(addr); + status = node_status_query(fd,&nname,ip, count); + + close(fd); + return status; +} + /* IRIX version */ int init(void) |