summaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
authorMichael McConville <mmcconville@mykolab.com>2015-12-05 17:42:40 -0500
committerMichael McConville <mmcconville@mykolab.com>2015-12-05 17:42:40 -0500
commit3a1d84cfc0988a3dbdba7a440571e987cb68973a (patch)
treeba21703f11c3ee99a7c8e5b8d1a161d0a9b21f2c /src/misc.c
parenta562291415922732e22cd23cd330901ffa57db45 (diff)
Replace copy_unsigned_string() with xstrdup().
Like copy_string(), copy_unsigned_string() is just a clone of the stlib's strdup(). We only use it twice. I'm pretty confident that char signedness is irrelevant in this case.
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/misc.c b/src/misc.c
index d973b24..2bea688 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -251,26 +251,6 @@ char *xstrdup(const char *s)
}
-/* copy_unsigned_string -
- * returns a dynamically allocated copy of a (potentially) unsigned string
- */
-
-unsigned char *copy_unsigned_string (unsigned char *str)
-{
- unsigned char *c;
- unsigned char *copy;
-
- /* find length */
- for (c = str; *c; ++c) ;
-
- copy = allocate_Character_array (c - str + 1);
-
- for (c = copy; (*c++ = *str++) != 0;) ;
-
- return copy;
-}
-
-
/* cclcmp - compares two characters for use by qsort with '\0' sorting last. */
int cclcmp (const void *a, const void *b)