Coverity fixes in log.c