INNER CODE UNIT · C

buf_free

Cateners/tiny_container · app/src/main/cpp/tiny_ipp_jni.c:316

static void buf_free(buf_t *b) { free(b->data); b->data = NULL; b->len = b->cap = 0; }

/* ---- collection encoding helpers (RFC 8010 §3.1.7) ---- */

static void col_start(buf_t *b, const char *name /* NULL = continuation */) {
    uint8_t tag = IPP_VTAG_BEGCOLLECTION;
    buf_write(b, &tag, 1);
    if (name) {
        buf_u16be(b, (uint16_t)strlen(name));
        buf_write(b, name, strlen(name));
    } else {
        buf_u16be(b, 0);
    }
    buf_u16be(b, 0);            /* value-length always 0 */
}

static void col_end(buf_t *b) {
    uint8_t tag = IPP_VTAG_ENDCOLLECTION;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…