Remove redundant code

Found by: scan-build
2 jobs for !39 with small-fixes in 2 minutes and 9 seconds (queued for 1 second)
merge request