Whitespace changes. No functionality has been modified.
Fix possible NULL pointer dereference.
Simplify code.