I’d suggest to give some more descriptive name to “logit” and expand comment “/* sanity check */“. This comment was easier to understand when elog() was near, but now IMO we can have few words about what is going on.
Done. Except for a new name for "logit" variable. Unfortunately, I can't think of anything sane. As an example I looked at sequence.c. The same name is used there. I will gladly change this name to whatever you want if it still look misleading or incomplete for you in some way or another. Just write the name that you think is correct.