Fixing issues found by, cppcheck and coverity, static code analysis tools
Running both cppcheck and coverity uncovered a bunch of issues in the code. Most of these was insignificant and resolved by removing e.g. unused variables, etc.
However, a few more suspicious ones was fixed
- Issue related to invalid use of chroot
- Issue related to use of mkstemp
- Issue related to use of rand(), instead of an appropriate random number generator, i.e. /dev/random or /dev/urandom
Signed-off-by: Eivind Næss eivnaes@yahoo.com