Remove vestigial function

Its logic was flawed (lacked a level of indirection) as reported
by CLANG and was not used anyway.
Refactor slurmd logic to eliminate CLANG error

CLANG was reporting a false positive. Made a function into a macro
to eliminate the error.
Remove dead stores reported by CLANG