coverity: fix missing initializer on const warning
coverity: fix dead code warning and clarify intended logic