43 *bp = (uint8_t)(high_bit | (val & 0x7f));
65 LOG(LOGD_DTN, LOG_SDNV, LOGL_DBG,
"sdnv_decode");
66 const uint8_t* start = bp;
68 LOG(LOGD_DTN, LOG_SDNV, LOGL_ERR,
"SDNV: NULL pointer");
74 LOG(LOGD_DTN, LOG_SDNV, LOGL_DBG,
"SDNV: len: %u", len);
76 LOG(LOGD_DTN, LOG_SDNV, LOGL_ERR,
"SDNV: buffer too short");
79 *val = (*val << 7) | (*bp & 0x7f);
82 if ((*bp & (1 << 7)) == 0){
91 LOG(LOGD_DTN, LOG_SDNV, LOGL_ERR,
"SDNV: val_len >= %u",
MAX_LENGTH);
95 LOG(LOGD_DTN, LOG_SDNV, LOGL_DBG,
"SDNV: val: %lu", *val);
102 for ( ; *bp++ & 0x80; ++val_len )