Remove all dead assignments as pointed out by `clang-analyzer`
linux: return early if we have no interfaces

This was pointed out as possible undefined allocation of 0 bytes by
`clang-analyzer`. `malloc` of 0 bytes can return either `NULL` or a
valid pointer which can't be dereferenced. On systems which return
`NULL`, we would consider it a `malloc` error and return an `ENOMEM` to
the caller.
Remove a dead increment as pointed out by `clang-analyzer`