X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=site.c;h=d0dd909d57aac307373df6c3132997f795f1c270;hb=4c795bdb6d8f0a75a7a484775151e810aac3de4c;hp=c702c7885095b009ca5bea65d259f9d778964823;hpb=c02fba3b053260d364ac3750f886dc057949ceb9;p=secnet.git diff --git a/site.c b/site.c index c702c78..d0dd909 100644 --- a/site.c +++ b/site.c @@ -767,7 +767,7 @@ static bool_t check_msg(struct site *st, uint32_t type, struct msg *m, return False; } if (type==LABEL_MSG2) return True; - if (!consttime_memeq(m->nR,st->remoteN,NONCELEN)!=0) { + if (!consttime_memeq(m->nR,st->remoteN,NONCELEN)) { *error="wrong remotely-generated nonce"; return False; } @@ -1781,8 +1781,8 @@ static bool_t named_for_us(struct site *st, const struct buffer_if *buf_in, } static bool_t we_have_priority(struct site *st, const struct msg *m) { - if ((st->local_capabilities & m->remote_capabilities) - && CAPAB_PRIORITY_MOBILE) { + if (st->local_capabilities & m->remote_capabilities & + CAPAB_PRIORITY_MOBILE) { if (st->local_mobile) return True; if (st-> peer_mobile) return False; }