1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

fixed 3 bugs in the wins server code related to precedence of ! and &

in C

please note that:
 if (! a & b)
is not the same as:
 if (! (a & b))
This commit is contained in:
Andrew Tridgell -
parent 4851b6a40f
commit ec6a098c2e

View File

@ -1952,8 +1952,8 @@ void nmbd_wins_new_entry(int msg_type, pid_t src, void *buf, size_t len)
/* I'm giving up on multi homed. Too much complex to understand */
if (record->wins_flags&WINS_MHOMED) {
if (! namerec->data.wins_flags&WINS_ACTIVE) {
if ( !namerec->data.wins_flags&WINS_RELEASED && !namerec->data.wins_flags&WINS_NGROUP)
if (! (namerec->data.wins_flags&WINS_ACTIVE)) {
if ( !(namerec->data.wins_flags&WINS_RELEASED) && !(namerec->data.wins_flags&WINS_NGROUP))
overwrite=True;
}
else {