MFC r343408: Silence Clang Scan warnings regarding unsafe use of strcp().
While these warnings are false positives, the use of strdup() instead of
malloc() and strcpy() simplifies and clarifies the code.
A bogus assignment to a variable (whose previous value may be required in
a later block) has also been removed.