This is nit picking but it bugs me to see the conditional repeated
like that.  Perhaps instead of:

    if (nextbyte && tarindex + 1 >= targsize)
        return (-1);
    if (tarindex + 1 < targsize)
        target[tarindex+1] = nextbyte;

Something more like:

    if (tarindex + 1 < targsize) {
        target[tarindex+1] = nextbyte;
    } else if (nextbyte) {
        return (-1);
    }

 - todd

Reply via email to