change macros to be more prover-friendly
@@ -20,12 +20,12 @@ protoop_id_t PROTOOP_ID_FEC_GENERATE_REPAIR_SYMBOLS = { .id = "fec_generate_repa
#define DEFAULT_FEC_SCHEME "xor"
#define for_each_source_symbol(fb, ____ss) \
- for (int ____i = 0, ____keep = 1; ____keep && ____i < fb->total_source_symbols; ____i++, ____keep = !____keep ) \
- for (____ss = fb->source_symbols[____i] ; ____keep ; ____keep = !____keep)
+ for (int ____i = 0, ____keep = 1; ____keep && ____i < fb->total_source_symbols; ____i++, ____keep = 1-____keep ) \
+ for (____ss = fb->source_symbols[____i] ; ____keep ; ____keep = 1-____keep)
#define for_each_repair_symbol(fb, ____ss) \
- for (int ____i = 0, ____keep = 1; ____keep && ____i < fb->total_repair_symbols; ____i++, ____keep = !____keep ) \
- for (____ss = fb->repair_symbols[____i] ; ____keep ; ____keep = !____keep)
+ for (int ____i = 0, ____keep = 1; ____keep && ____i < fb->total_repair_symbols; ____i++, ____keep = 1-____keep ) \
+ for (____ss = fb->repair_symbols[____i] ; ____keep ; ____keep = 1-____keep)
typedef union {
uint32_t raw;
@@ -178,10 +178,6 @@ static inline void parse_sfpid_frame(source_fpid_frame_t *frame_to_parse, uint8_
frame_to_parse->source_fpid.raw = decode_u32(bytes);
}
-static inline void write_sfpid_frame(source_fpid_frame_t *frame_to_write, uint8_t *bytes) {
- encode_u32(frame_to_write->source_fpid.raw, bytes);
-}
-
// assumes that size if safe
static inline source_symbol_t *malloc_source_symbol(picoquic_cnx_t *cnx, source_fpid_t source_fpid, uint16_t size) {
source_symbol_t *s = (source_symbol_t *) my_malloc(cnx, sizeof(source_symbol_t));
