summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-12-02 19:00:18 +0000
committerJeremy Allison <jra@samba.org>1997-12-02 19:00:18 +0000
commit94d53dcac5d06e48be5cea9d54625da795f62d20 (patch)
tree6c84926efc7526ffe2f05c626e5d9eedf11b6400
parentf67e21f73ffa3bbb1f3bffae709219c86be236f6 (diff)
downloadsamba-94d53dcac5d06e48be5cea9d54625da795f62d20.tar.gz
samba-94d53dcac5d06e48be5cea9d54625da795f62d20.tar.xz
samba-94d53dcac5d06e48be5cea9d54625da795f62d20.zip
asyncdns.c: Removed warning when compiling with -DSYNC_DNS.
nameelect.c: Tidied up settings of work->ServerType when unbecoming things. nmbd.c: Fixed pidFile warning. server.c: Fixed pidFile warning. Jeremy.
-rw-r--r--source/nameelect.c24
-rw-r--r--source/nmbd/asyncdns.c1
-rw-r--r--source/nmbd/nmbd.c4
-rw-r--r--source/smbd/server.c4
4 files changed, 11 insertions, 22 deletions
diff --git a/source/nameelect.c b/source/nameelect.c
index c5d145f9791..b977741c5fa 100644
--- a/source/nameelect.c
+++ b/source/nameelect.c
@@ -586,14 +586,9 @@ void become_logon_server(struct subnet_record *d, struct work_record *work)
void unbecome_local_master(struct subnet_record *d, struct work_record *work,
int remove_type)
{
- int new_server_type = work->ServerType;
-
/* can only remove master types with this function */
- remove_type &= SV_TYPE_MASTER_BROWSER;
-
- new_server_type &= ~remove_type;
- if (remove_type)
+ if (remove_type & SV_TYPE_MASTER_BROWSER)
{
DEBUG(2,("Becoming local non-master for %s\n",work->work_group));
@@ -619,19 +614,14 @@ void unbecome_local_master(struct subnet_record *d, struct work_record *work,
void unbecome_domain_master(struct subnet_record *d, struct work_record *work,
int remove_type)
{
- int new_server_type = work->ServerType;
-
DEBUG(2,("Becoming domain non-master for %s\n",work->work_group));
/* can only remove master or domain types with this function */
- remove_type &= SV_TYPE_DOMAIN_MASTER;
-
- new_server_type &= ~remove_type;
-
- if (remove_type)
+ if (remove_type & SV_TYPE_DOMAIN_MASTER)
{
/* no longer a domain master browser of any sort */
+ work->ServerType &= ~SV_TYPE_DOMAIN_MASTER;
work->dom_state = DOMAIN_NONE;
/* announce ourselves as no longer active as a master browser on
@@ -659,19 +649,15 @@ void unbecome_domain_master(struct subnet_record *d, struct work_record *work,
void unbecome_logon_server(struct subnet_record *d, struct work_record *work,
int remove_type)
{
- int new_server_type = work->ServerType;
-
DEBUG(2,("Becoming logon non-server for %s\n",work->work_group));
/* can only remove master or domain types with this function */
- remove_type &= SV_TYPE_DOMAIN_MEMBER;
-
- new_server_type &= ~remove_type;
- if (remove_type)
+ if (remove_type & SV_TYPE_DOMAIN_MEMBER)
{
/* no longer a master browser of any sort */
+ work->ServerType &= ~SV_TYPE_DOMAIN_MEMBER;
work->log_state = LOGON_NONE;
remove_name_entry(d,work->work_group,0x1c);
diff --git a/source/nmbd/asyncdns.c b/source/nmbd/asyncdns.c
index 3d1b3cc9951..c87e0907543 100644
--- a/source/nmbd/asyncdns.c
+++ b/source/nmbd/asyncdns.c
@@ -266,7 +266,6 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question,
BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question,
struct name_record **n)
{
- int name_type = question->name_type;
char *qname = question->name;
struct in_addr dns_ip;
diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c
index 1e4a2d9a790..a34e2caf42b 100644
--- a/source/nmbd/nmbd.c
+++ b/source/nmbd/nmbd.c
@@ -465,7 +465,9 @@ static void usage(char *pname)
int opt;
extern FILE *dbf;
extern char *optarg;
- char pidFile[100] = { 0 };
+ char pidFile[100];
+
+ *pidFile = '\0';
global_nmb_port = NMB_PORT;
*host_file = 0;
diff --git a/source/smbd/server.c b/source/smbd/server.c
index 9ca4ab5b781..d707699e339 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -5043,7 +5043,9 @@ static void usage(char *pname)
int port = SMB_PORT;
int opt;
extern char *optarg;
- char pidFile[100] = { 0 };
+ char pidFile[100];
+
+ *pidFile = '\0';
#ifdef NEED_AUTH_PARAMETERS
set_auth_parameters(argc,argv);