summaryrefslogtreecommitdiff
path: root/source3/lib/wins_srv.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-12 23:15:52 +0000
committerJeremy Allison <jra@samba.org>2002-11-12 23:15:52 +0000
commit250c9801197ea1c949bd94c1c891f81ab118b130 (patch)
tree3a0ec79c71a010961d78726e223a70e1bc75c73f /source3/lib/wins_srv.c
parent477025a6f628fd1a8d3bfacd30726e7a41819e50 (diff)
downloadsamba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.gz
samba-250c9801197ea1c949bd94c1c891f81ab118b130.tar.bz2
samba-250c9801197ea1c949bd94c1c891f81ab118b130.zip
Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a)
Diffstat (limited to 'source3/lib/wins_srv.c')
-rw-r--r--source3/lib/wins_srv.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/lib/wins_srv.c b/source3/lib/wins_srv.c
index 61e77aca58..01dfd6dd62 100644
--- a/source3/lib/wins_srv.c
+++ b/source3/lib/wins_srv.c
@@ -154,7 +154,7 @@ void wins_srv_died(struct in_addr wins_ip, struct in_addr src_ip)
*/
unsigned wins_srv_count(void)
{
- char **list;
+ const char **list;
int count = 0;
if (lp_wins_support()) {
@@ -163,7 +163,8 @@ unsigned wins_srv_count(void)
}
list = lp_wins_server_list();
- for (count=0; list && list[count]; count++) /* nop */ ;
+ for (count=0; list && list[count]; count++)
+ /* nop */ ;
return count;
}
@@ -202,7 +203,7 @@ char **wins_srv_tags(void)
{
char **ret = NULL;
int count=0, i, j;
- char **list;
+ const char **list;
if (lp_wins_support()) {
/* give the caller something to chew on. This makes
@@ -215,7 +216,8 @@ char **wins_srv_tags(void)
}
list = lp_wins_server_list();
- if (!list) return NULL;
+ if (!list)
+ return NULL;
/* yes, this is O(n^2) but n is very small */
for (i=0;list[i];i++) {
@@ -268,7 +270,7 @@ void wins_srv_tags_free(char **list)
*/
struct in_addr wins_srv_ip_tag(const char *tag, struct in_addr src_ip)
{
- char **list;
+ const char **list;
int i;
struct tagged_ip t_ip;
@@ -324,7 +326,7 @@ struct in_addr wins_srv_ip_tag(const char *tag, struct in_addr src_ip)
*/
unsigned wins_srv_count_tag(const char *tag)
{
- char **list;
+ const char **list;
int i, count=0;
/* if we are a wins server then we always just talk to ourselves */