All,

jk_msg_buff.c contains this static declaration near the top of the file:

static char *jk_HEX = "0123456789ABCDEFX";

That trailing "X" looks suspicious. It adds a byte to the end of the string, and doesn't appear to be used because this is the only use of this string anywhere in the rest of the file:

            unsigned char x = (msg->buf[i + j]);
            if ((i + j) >= len)
                x = 0;
            *current++ = jk_HEX[x >> 4];
            *current++ = jk_HEX[x & 0x0f];

1 byte >> 4 will always be < 16 and 1 byte & 0x0f will also always be < 16 so I think the extra character in the string is unnecessary and a little confusing.

Any objections to removing it?

-chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to