dalgaaf/ceph — pull request #1 by dalgaaf (2013-07-16 21:32:21+00:00)
Title: Fix some issues from SCA - v2

Update version of pull request #428. I've removed two of the patches, since they need to get reworked.

---
Includes smaller issues like:
- reduce scope of local variables
- same expression on both sides of '||'
- remove unused local variable
- don't return bool if return value is int
- return result of function calls
- use static_cast instead of C-Style cast
- fix dereferencing after deallocation

And these two issues (please check them carefully)
- fix malloc memory leak