Minor bugfix: Add a NULL check for dh
Dereference before null check: fixed
Logically dead code: fixed
Missing break in switch: commented
surround macros with braces

fixes unintended use in special cases
Unchecked return value: fixed
use dedicated coverity_scan branch
added Coverity Scan Badge