Coverity hates it when we do "E1 ? E2 : E2".

It says, 'Incorrect expression (IDENTICAL_BRANCHES)'

Fix for CID 1364127. Not in any released Tor.
This commit is contained in:
Nick Mathewson 2016-07-21 14:14:33 +02:00
parent 4d5b252f0f
commit f1973e70a4

View File

@ -608,7 +608,6 @@ sb_socket(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
const int pf = i ? PF_INET : PF_INET6;
for (j=0; j < 3; ++j) {
const int type = (j == 0) ? SOCK_STREAM :
(j == 1) ? SOCK_DGRAM :
SOCK_DGRAM;
const int protocol = (j == 0) ? IPPROTO_TCP :
(j == 1) ? IPPROTO_IP :