l2cap_signaling: add LCOV_EXCL_BR_LINE to exclude va_arg branch line

This commit is contained in:
Milanka Ringwald 2021-06-21 10:37:16 +02:00
parent 22b6e67bdd
commit c0dd2f5cbd

View File

@ -117,14 +117,14 @@ static uint16_t l2cap_create_signaling_internal(uint8_t * acl_buffer, hci_con_ha
while (*format) {
switch(*format) {
case '2': // 16 bit value
word = va_arg(argptr, int);
word = va_arg(argptr, int); // LCOV_EXCL_BR_LINE
// minimal va_arg is int: 2 bytes on 8+16 bit CPUs
acl_buffer[pos++] = word & 0xffu;
acl_buffer[pos++] = word >> 8;
break;
case 'D': // variable data. passed: len, ptr
word = va_arg(argptr, int);
ptr = va_arg(argptr, uint8_t *);
word = va_arg(argptr, int); // LCOV_EXCL_BR_LINE
ptr = va_arg(argptr, uint8_t *); // LCOV_EXCL_BR_LINE
(void)memcpy(&acl_buffer[pos], ptr, word);
pos += word;
break;