1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

Fix CID 475. work should not be checked against NULL

here as it can never be null.
Jeremy.
This commit is contained in:
Jeremy Allison 2008-01-11 23:56:48 -08:00
parent 0599d57eff
commit ecb52f50fe

View File

@ -257,7 +257,7 @@ void process_local_master_announce(struct subnet_record *subrec, struct packet_s
uint32 servertype = IVAL(buf,23);
fstring comment;
unstring work_name;
struct work_record *work;
struct work_record *work = NULL;
struct server_record *servrec;
unstring source_name;
@ -344,7 +344,7 @@ a local master browser for workgroup %s and we think we are master. Forcing elec
* This server is announcing it is going down. Remove it from the
* workgroup.
*/
if(!is_myname(server_name) && (work != NULL) &&
if(!is_myname(server_name) &&
((servrec = find_server_in_workgroup( work, server_name))!=NULL)) {
remove_server_from_workgroup( work, servrec);
}