Fix a couple of "make check" issues

There was some logic copied from bitstring.c and an unused variable
problem reported by the compiler.