• Travis Cross's avatar
    Help the static analyzer in `handle_ice` · aa1a05d0
    Travis Cross 提交于
    Clang's static analyzer thinks we could be using `hosts` here when it
    is NULL.  We probably weren't, but it's easy to see how it could think
    so.  We were checking whether `from_addr` matched `ice->addr` three
    times, and between the second on third time we might have modified the
    `ice->addr`; however we only get there if it matched the second time,
    so we could only make it not match at that point and avoid the third
    branch.  We can't make it match where it did not before.
    
    We'll simplify the logic a bit here so static analyzers (and humans)
    can hopefully see this more readily.
    aa1a05d0
switch_rtp.c 215.7 KB