| 169 | } |
| 170 | |
| 171 | uint8_t *queue_found_put(const struct bdb_queue_found *p_queue_found, |
| 172 | uint8_t *p_buf, const uint8_t *p_buf_end) |
| 173 | { |
| 174 | if (p_buf_end < p_buf || QUEUE_FOUND_LEN > (p_buf_end - p_buf)) |
| 175 | return NULL; |
| 176 | |
| 177 | p_buf = buf_put(&(p_queue_found->genid), sizeof(p_queue_found->genid), |
| 178 | p_buf, p_buf_end); |
| 179 | p_buf = buf_put(&(p_queue_found->data_len), sizeof(p_queue_found->data_len), |
| 180 | p_buf, p_buf_end); |
| 181 | p_buf = buf_put(&(p_queue_found->data_offset), |
| 182 | sizeof(p_queue_found->data_offset), p_buf, p_buf_end); |
| 183 | p_buf = |
| 184 | buf_put(&(p_queue_found->trans.num_fragments), |
| 185 | sizeof(p_queue_found->trans.num_fragments), p_buf, p_buf_end); |
| 186 | p_buf = buf_put(&(p_queue_found->epoch), sizeof(p_queue_found->epoch), |
| 187 | p_buf, p_buf_end); |
| 188 | |
| 189 | return p_buf; |
| 190 | } |
| 191 | |
| 192 | enum { QUEUE_FOUND_SEQ_LEN = 8 + 4 + 4 + 4 + 4 + 4 + 4 }; |
| 193 |
no test coverage detected