do not use undefined value in log_debug()
Merge branch 'coverity'
Merge branch 'master' into portable