void OCT_chop()

in src/oct.c [345:359]


void OCT_chop(octet *x,octet *y,int n)
{
    if (n>=x->len)
    {
        if (y!=NULL) y->len=0;
        return;
    }
    if (y!=NULL) y->len=x->len-n;
    x->len=n;

    if (y!=NULL)
    {
        for (int i=0; i<y->len && i<y->max; i++) y->val[i]=x->val[i+n];
    }
}