On 10/05/15 12:18, Martin Lucina wrote:
KASSERT() that rslen <= MCLBYTES is a good idea.  Actually, can be a
CTASSERT()

Adding CTASSERT(rslen <= MCLBYTES); results in a totally unintelligible set
of build errors:

"garbage in, garbage out"

CTASSERT() is Compile Time Assert. You can't (obviously!) use it to check variables.

What you assign to rslen is a compile-time constant and can be CTASSERTed. (and in those cases it's also good practice to sprinkle "const" to make the compiler's job easier, though I guess one might prefer #define here)

Reply via email to