Use strdup to copy strings
Where we have
newStr = malloc(strlen(oldStr)+1);
strcpy(newStr, oldStr);
replace these with
newStr = strdup(oldStr);
It's shorter, clearer, and gets rid of a load of occurences of strcpy,
which some compilers are now warning is unsafe (although it isn't in
this context)
Get rid of a number of custom duplicate string functions and replace
them with strdup where the behaviour is identical
Change-Id: If800343a7d13b1ba6362d4570a2a324fa3525250
Reviewed-on: http://gerrit.openafs.org/7450
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
48 files changed: