*(int *)lvalue = CFG_AUTO_PORT;
break;
}
- /* fall through */
+ FALLTHROUGH;
case CONFIG_TYPE_INT:
case CONFIG_TYPE_UINT:
i = (int)tor_parse_long(c->value, 10,
escape_val = 0;
break;
}
- /* fall through */
+ FALLTHROUGH;
case CONFIG_TYPE_CSV_INTERVAL:
case CONFIG_TYPE_INTERVAL:
case CONFIG_TYPE_MSEC_INTERVAL:
tor_asprintf(&result->value, "%d", *(int*)value);
escape_val = 0; /* Can't need escape. */
break;
- case CONFIG_TYPE_UINT64: /* Fall through */
+ case CONFIG_TYPE_UINT64: FALLTHROUGH;
case CONFIG_TYPE_MEMUNIT:
tor_asprintf(&result->value, "%"PRIu64,
(*(uint64_t*)value));
escape_val = 0;
break;
}
- /* fall through */
+ FALLTHROUGH;
case CONFIG_TYPE_BOOL:
result->value = tor_strdup(*(int*)value ? "1" : "0");
escape_val = 0; /* Can't need escape. */
/* But that should be happening any longer've disabled bufferevents. */
tor_assert_nonfatal_unreached_once();
- /* fall through */
+ FALLTHROUGH;
case OR_CONN_STATE_TLS_SERVER_RENEGOTIATING:
if (!(command_allowed_before_handshake(var_cell->command))) {
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
/* For these three, we want to pick the exit like a middle hop,
* since it should be random. */
tor_assert_nonfatal(is_internal);
- /* Falls through */
+ FALLTHROUGH;
case CIRCUIT_PURPOSE_C_GENERAL:
if (is_internal) /* pick it like a middle hop */
return router_choose_random_node(NULL, options->ExcludeNodes, flags);
"Unrecognized circuit purpose: %d",
(int)purpose);
tor_fragile_assert();
- /* fall through */
+ FALLTHROUGH;
case CIRCUIT_PURPOSE_OR:
case CIRCUIT_PURPOSE_C_GENERAL:
{
case CPATH_STATE_OPEN:
relay_crypto_assert_ok(&cp->crypto);
- /* fall through */
+ FALLTHROUGH;
case CPATH_STATE_CLOSED:
/*XXXX Assert that there's no handshake_state either. */
tor_assert(!cp->rend_dh_handshake_state);
TO_ORIGIN_CIRCUIT(victim)->build_state->pending_final_cpath ==
NULL)
break;
- /* fallthrough! */
+ FALLTHROUGH;
case CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT:
case CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED:
/* If we have reached this line, we want to spare the circ for now. */
}
/* Fall through if the connection is on a circuit without optimistic
* data support. */
- /* Falls through. */
+ FALLTHROUGH;
case EXIT_CONN_STATE_CONNECTING:
case AP_CONN_STATE_RENDDESC_WAIT:
case AP_CONN_STATE_CIRCUIT_WAIT:
p += 16;
space -= 16;
}
- /* Fall through */
+ FALLTHROUGH;
case CELL_CREATE_FAST:
tor_assert(cell_in->handshake_len <= space);
memcpy(p, cell_in->onionskin, cell_in->handshake_len);
return "HTTP/1.0 502 Bad Gateway (tor protocol violation)\r\n\r\n";
case END_STREAM_REASON_ENTRYPOLICY:
return "HTTP/1.0 403 Forbidden (entry policy violation)\r\n\r\n";
- case END_STREAM_REASON_NOTDIRECTORY: /* Fall Through */
+ case END_STREAM_REASON_NOTDIRECTORY: FALLTHROUGH;
default:
tor_assert_nonfatal_unreached();
return "HTTP/1.0 500 Internal Server Error (weird end reason)\r\n\r\n";
break; /* break means it'll close, below */
/* Else fall through: expire this circuit, clear the
* chosen_exit_name field, and try again. */
- /* Falls through. */
+ FALLTHROUGH;
case END_STREAM_REASON_RESOLVEFAILED:
case END_STREAM_REASON_TIMEOUT:
case END_STREAM_REASON_MISC:
case SCHEDULER_KIST_LITE:
return "KISTLite";
case SCHEDULER_NONE:
- /* fallthrough */
+ FALLTHROUGH;
default:
tor_assert_unreached();
return "(N/A)";
scheduler_kist_set_lite_mode();
goto end;
case SCHEDULER_NONE:
- /* fallthrough */
+ FALLTHROUGH;
default:
/* Our option validation should have caught this. */
tor_assert_unreached();
case SOCKS_RESULT_TRUNCATED:
if (datalen == n_pullup)
return 0;
- /* FALLTHRU */
+ FALLTHROUGH;
case SOCKS_RESULT_MORE_EXPECTED:
res = 0;
break;
strlcpy((char*)req->reply, SOCKS_PROXY_IS_NOT_AN_HTTP_PROXY_MSG,
MAX_SOCKS_REPLY_LEN);
req->replylen = strlen((char*)req->reply)+1;
- /* fall through */
+ FALLTHROUGH;
default: /* version is not socks4 or socks5 */
log_warn(LD_APP,
"Socks version %d not recognized. (This port is not an "
}
switch (src_sz - blocks) {
- case 7: last7 |= (uint64_t)m[i + 6] << 48; /* Falls through. */
- case 6: last7 |= (uint64_t)m[i + 5] << 40; /* Falls through. */
- case 5: last7 |= (uint64_t)m[i + 4] << 32; /* Falls through. */
- case 4: last7 |= (uint64_t)m[i + 3] << 24; /* Falls through. */
- case 3: last7 |= (uint64_t)m[i + 2] << 16; /* Falls through. */
- case 2: last7 |= (uint64_t)m[i + 1] << 8; /* Falls through. */
- case 1: last7 |= (uint64_t)m[i + 0] ; /* Falls through. */
+ case 7: last7 |= (uint64_t)m[i + 6] << 48; FALLTHROUGH;
+ case 6: last7 |= (uint64_t)m[i + 5] << 40; FALLTHROUGH;
+ case 5: last7 |= (uint64_t)m[i + 4] << 32; FALLTHROUGH;
+ case 4: last7 |= (uint64_t)m[i + 3] << 24; FALLTHROUGH;
+ case 3: last7 |= (uint64_t)m[i + 2] << 16; FALLTHROUGH;
+ case 2: last7 |= (uint64_t)m[i + 1] << 8; FALLTHROUGH;
+ case 1: last7 |= (uint64_t)m[i + 0] ; FALLTHROUGH;
case 0:
default:;
}
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
- case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
- case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
- case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
- case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
- case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
- case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
- case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
- case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
+ case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
+ case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
+ case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
+ case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
+ case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
+ case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
+ case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
+ case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
case 0:
default: out[i] = (a[i] - b[i]) - carry;
}
static int
lt256_modm_batch(const bignum256modm a, const bignum256modm b, size_t limbsize) {
switch (limbsize) {
- case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; /* Falls through. */
- case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; /* Falls through. */
- case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; /* Falls through. */
- case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; /* Falls through. */
- case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; /* Falls through. */
- case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; /* Falls through. */
- case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; /* Falls through. */
- case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; /* Falls through. */
+ case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; FALLTHROUGH;
+ case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; FALLTHROUGH;
+ case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; FALLTHROUGH;
+ case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; FALLTHROUGH;
+ case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; FALLTHROUGH;
+ case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; FALLTHROUGH;
+ case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; FALLTHROUGH;
+ case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; FALLTHROUGH;
case 0: if (a[0] > b[0]) return 0; if (a[0] < b[0]) return 1;
}
return 0;
static int
lte256_modm_batch(const bignum256modm a, const bignum256modm b, size_t limbsize) {
switch (limbsize) {
- case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; /* Falls through. */
- case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; /* Falls through. */
- case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; /* Falls through. */
- case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; /* Falls through. */
- case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; /* Falls through. */
- case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; /* Falls through. */
- case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; /* Falls through. */
- case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; /* Falls through. */
+ case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; FALLTHROUGH;
+ case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; FALLTHROUGH;
+ case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; FALLTHROUGH;
+ case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; FALLTHROUGH;
+ case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; FALLTHROUGH;
+ case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; FALLTHROUGH;
+ case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; FALLTHROUGH;
+ case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; FALLTHROUGH;
case 0: if (a[0] > b[0]) return 0; if (a[0] < b[0]) return 1;
}
return 1;
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
- case 4: out[i] = (a[i] - b[i]) ; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; /* Falls through. */
- case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; /* Falls through. */
- case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; /* Falls through. */
- case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; /* Falls through. */
+ case 4: out[i] = (a[i] - b[i]) ; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; FALLTHROUGH;
+ case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; FALLTHROUGH;
+ case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; FALLTHROUGH;
+ case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; FALLTHROUGH;
case 0:
default: out[i] = (a[i] - b[i]) - carry;
}
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
- case 4: t = (a[i] - b[i]) ; carry = (t >> 63); i++; /* Falls through. */
- case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* Falls through. */
- case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* Falls through. */
- case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* Falls through. */
+ case 4: t = (a[i] - b[i]) ; carry = (t >> 63); i++; FALLTHROUGH;
+ case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; FALLTHROUGH;
+ case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; FALLTHROUGH;
+ case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; FALLTHROUGH;
case 0: t = (a[i] - b[i]) - carry; carry = (t >> 63);
}
return (int)carry;
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
- case 4: t = (b[i] - a[i]) ; carry = (t >> 63); i++; /* Falls through. */
- case 3: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++; /* Falls through. */
- case 2: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++; /* Falls through. */
- case 1: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++; /* Falls through. */
+ case 4: t = (b[i] - a[i]) ; carry = (t >> 63); i++; FALLTHROUGH;
+ case 3: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++; FALLTHROUGH;
+ case 2: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++; FALLTHROUGH;
+ case 1: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++; FALLTHROUGH;
case 0: t = (b[i] - a[i]) - carry; carry = (t >> 63);
}
return (int)!carry;
break;
default:
tor_assert_nonfatal_unreached();
- /* Fall through. */
+ FALLTHROUGH;
case GUARD_CIRC_STATE_USABLE_IF_NO_BETTER_GUARD:
if (guard->is_primary) {
/* XXXX #20832 -- I don't actually like this logic. It seems to make
case RSAE_BADAUTH:
connection_printf_to_buf(conn, "512 Invalid client authorization\r\n");
break;
- case RSAE_INTERNAL: /* FALLSTHROUGH */
+ case RSAE_INTERNAL: FALLTHROUGH;
default:
connection_printf_to_buf(conn, "551 Failed to add Onion Service\r\n");
}
case 1:
/* start flushing conn */
conn->base_.state = DIR_CONN_STATE_CLIENT_SENDING;
- /* fall through */
+ FALLTHROUGH;
case 0:
/* queue the command on the outbuf */
directory_send_command(conn, 1, request);
kwd, crypto_pk_num_bits(tok->key));
RET_ERR(ebuf);
}
- /* fall through */
+ FALLTHROUGH;
case NEED_KEY: /* There must be some kind of key. */
if (!tok->key) {
tor_snprintf(ebuf, sizeof(ebuf), "Missing public key for %s", kwd);
answer_type = RESOLVED_TYPE_ERROR;
/* We let this fall through and treat it as an error. */
}
- /* Falls through. */
+ FALLTHROUGH;
case RESOLVED_TYPE_ERROR_TRANSIENT:
case RESOLVED_TYPE_ERROR:
{
log_warn(LD_BUG, "Unknown failure type %u. Removing intro point.",
failure_type);
tor_fragile_assert();
- /* fall through */
+ FALLTHROUGH;
case INTRO_POINT_FAILURE_GENERIC:
rend_cache_intro_failure_note(failure_type,
(uint8_t *)failed_intro->identity_digest,
case DIGEST_SHA1: return SEC_OID_SHA1;
case DIGEST_SHA256: return SEC_OID_SHA256;
case DIGEST_SHA512: return SEC_OID_SHA512;
- case DIGEST_SHA3_256: /* Fall through */
- case DIGEST_SHA3_512: /* Fall through */
+ case DIGEST_SHA3_256: FALLTHROUGH;
+ case DIGEST_SHA3_512: FALLTHROUGH;
default:
return SEC_OID_UNKNOWN;
}
library_supports_digest(digest_algorithm_t alg)
{
switch (alg) {
- case DIGEST_SHA1: /* Fall through */
- case DIGEST_SHA256: /* Fall through */
+ case DIGEST_SHA1: FALLTHROUGH;
+ case DIGEST_SHA256: FALLTHROUGH;
case DIGEST_SHA512:
return true;
- case DIGEST_SHA3_256: /* Fall through */
- case DIGEST_SHA3_512: /* Fall through */
+ case DIGEST_SHA3_256: FALLTHROUGH;
+ case DIGEST_SHA3_512: FALLTHROUGH;
default:
return false;
}
STRUCT_FIELD_SIZE(crypto_digest_t, f))
switch (alg) {
#ifdef ENABLE_NSS
- case DIGEST_SHA1: /* Fall through */
- case DIGEST_SHA256: /* Fall through */
+ case DIGEST_SHA1: FALLTHROUGH;
+ case DIGEST_SHA256: FALLTHROUGH;
case DIGEST_SHA512:
return END_OF_FIELD(d.ctx);
#else
switch (algorithm)
{
#ifdef ENABLE_NSS
- case DIGEST_SHA1: /* fall through */
- case DIGEST_SHA256: /* fall through */
+ case DIGEST_SHA1: FALLTHROUGH;
+ case DIGEST_SHA256: FALLTHROUGH;
case DIGEST_SHA512:
r->d.ctx = PK11_CreateDigestContext(digest_alg_to_nss_oid(algorithm));
if (BUG(!r->d.ctx)) {
*/
switch (digest->algorithm) {
#ifdef ENABLE_NSS
- case DIGEST_SHA1: /* fall through */
- case DIGEST_SHA256: /* fall through */
+ case DIGEST_SHA1: FALLTHROUGH;
+ case DIGEST_SHA256: FALLTHROUGH;
case DIGEST_SHA512:
tor_assert(len <= UINT_MAX);
SECStatus s = PK11_DigestOp(digest->d.ctx,
SHA512_Update(&digest->d.sha512, (void*)data, len);
break;
#endif
- case DIGEST_SHA3_256: /* FALLSTHROUGH */
+ case DIGEST_SHA3_256: FALLTHROUGH;
case DIGEST_SHA3_512:
keccak_digest_update(&digest->d.sha3, (const uint8_t *)data, len);
break;
SHA512_Final(r, &tmpenv.d.sha512);
break;
//LCOV_EXCL_START
- case DIGEST_SHA3_256: /* FALLSTHROUGH */
+ case DIGEST_SHA3_256: FALLTHROUGH;
case DIGEST_SHA3_512:
default:
log_warn(LD_BUG, "Handling unexpected algorithm %d", digest->algorithm);
for (i = 0; i < ARRAY_LENGTH(commands); ++i) {
for (j = 0; j < commands[i].len; ++j) {
switch (commands[i].setup) {
- default: /* Falls through */
+ default: FALLTHROUGH;
case NONE:
/* This test calls for no setup on the socks state. */
break;