POSIX: add missing curly braces

It seems that the original commit missed the curly braces for the scope, always
doing the string comparision.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@203357 91177308-0d34-0410-b5e6-96231b3b80d8
POSIX: fix possible invalid API usage

strcmp cannot be passed a NULL.  Add a short-circuiting check to avoid the
possible API misuse.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@203358 91177308-0d34-0410-b5e6-96231b3b80d8
POSIX: fix possible API misuse

memcpy cannot be passed NULL.  Ensuring that the destination pointer is non-NULL
requires checking success.  Rather than performing the success check at that
point, increasing indentation an additional level, fold it into the previous
statement.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@203359 91177308-0d34-0410-b5e6-96231b3b80d8