* coverity: strfcpy
* coverity: add variable - function arg could be NULL/invalid
* coverity: add variable - failed function leads to invalid variable
* coverity: add variable - Context could become NULL
* coverity: add variable - alloc/strdup could return NULL
* coverity: add variable - route through code leads to invalid variable
* coverity: remove variable test
* coverity: test functions
* coverity: tidy switches
* coverity: unused variables
* coverity: refactor only
* coverity: check for buffer underruns
* coverity: fix leaks
* coverity: minor fixes