summaryrefslogtreecommitdiffstats
path: root/source/nmbd/nmbd_winsserver.c
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>1998-06-23 08:15:05 +0000
committerChristopher R. Hertel <crh@samba.org>1998-06-23 08:15:05 +0000
commit384122d165ed6d5d211a29e5a63a63bf5cd82c75 (patch)
tree4b0cb7055c86744a17c43ba88cf13210f0164ac1 /source/nmbd/nmbd_winsserver.c
parentc749c8d0460feddafaa68654d8a4bec33f97cc8c (diff)
downloadsamba-384122d165ed6d5d211a29e5a63a63bf5cd82c75.tar.gz
samba-384122d165ed6d5d211a29e5a63a63bf5cd82c75.tar.xz
samba-384122d165ed6d5d211a29e5a63a63bf5cd82c75.zip
The function add_name_to_subnet(), in file nmbd_namelistdb.c, returns a
pointer to the newly constructed name list entry. In most cases, this return value is ignored. The two exceptions are in asyncdns.c and nmbd_winsproxy.c. Most of the calls which ignored the return value were not cast to void, so I added the cast. This helped me sort out which calls really did use the return value. I also discovered one case, in nmbd_winsserver.c, in which the return value was being stored to a variable which, in turn, was not used. Chris -)-----
Diffstat (limited to 'source/nmbd/nmbd_winsserver.c')
-rw-r--r--source/nmbd/nmbd_winsserver.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/nmbd/nmbd_winsserver.c b/source/nmbd/nmbd_winsserver.c
index 304e9f4dba6..e8dd78f1abe 100644
--- a/source/nmbd/nmbd_winsserver.c
+++ b/source/nmbd/nmbd_winsserver.c
@@ -268,16 +268,14 @@ BOOL initialise_wins(void)
/* add all entries that have 60 seconds or more to live */
if ((ttl - 60) > time_now || ttl == PERMANENT_TTL)
{
- struct name_record *namerec;
-
if(ttl != PERMANENT_TTL)
ttl -= time_now;
- DEBUG(4, ("initialise_wins: add name: %s#%02x ttl = %d first IP %s flags = %2x\n",
+ DEBUG( 4, ("initialise_wins: add name: %s#%02x ttl = %d first IP %s flags = %2x\n",
name, type, ttl, inet_ntoa(ip_list[0]), nb_flags));
- namerec = add_name_to_subnet(wins_server_subnet, name, type, nb_flags,
- ttl, REGISTER_NAME, num_ips, ip_list);
+ (void)add_name_to_subnet( wins_server_subnet, name, type, nb_flags,
+ ttl, REGISTER_NAME, num_ips, ip_list );
}
else
@@ -834,8 +832,8 @@ is one of our (WINS server) names. Denying registration.\n", namestr(question) )
* Name did not exist - add it.
*/
- add_name_to_subnet(subrec, question->name, question->name_type,
- nb_flags, ttl, REGISTER_NAME, 1, &from_ip);
+ (void)add_name_to_subnet( subrec, question->name, question->name_type,
+ nb_flags, ttl, REGISTER_NAME, 1, &from_ip );
send_wins_name_registration_response(0, ttl, p);
}
@@ -1123,8 +1121,8 @@ is one of our (WINS server) names. Denying registration.\n", namestr(question) )
* Name did not exist - add it.
*/
- add_name_to_subnet(subrec, question->name, question->name_type,
- nb_flags, ttl, REGISTER_NAME, 1, &from_ip);
+ (void)add_name_to_subnet( subrec, question->name, question->name_type,
+ nb_flags, ttl, REGISTER_NAME, 1, &from_ip );
send_wins_name_registration_response(0, ttl, p);
}