daemon: fix coverity.com minor issues
Issue generated from Tuleap's migration script. Originally submitted by: Guillaume Roguez (guillaume)
Our coverity scan has found many minor issues, mostly fixable by very few changes.
https://scan.coverity.com/projects/ring?tab=overview
This tickets follows them.