[hackers] [sbase] sed: remove unused strnacpy() || Hiltjo Posthuma
commit dd395693d40f01a4634a73fc74b358c60c641d1b
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Tue Apr 7 19:08:53 2015 +0200
sed: remove unused strnacpy()
diff --git a/sed.c b/sed.c
index ddf90f5..ec8c290 100644
--- a/sed.c
+++ b/sed.c
_AT_@ -122,7 +122,6 @@ static void push(Vec *v, void *p);
static void stracat(String *dst, char *src);
static void strnacat(String *dst, char *src, size_t n);
static void stracpy(String *dst, char *src);
-static void strnacpy(String *dst, char *src, size_t n);
/* Cleanup and errors */
static void usage(void);
_AT_@ -343,18 +342,6 @@ stracpy(String *dst, char *src)
}
static void
-strnacpy(String *dst, char *src, size_t n)
-{
- size_t len;
-
- len = strlen(src);
- len = strlen(dst->str) + MIN(n, len) + 1;
- if (dst->cap < len)
- resize((void **)&dst->str, &dst->cap, 1, len * 2, NULL);
- estrlcpy(dst->str, src, len);
-}
-
-static void
leprintf(char *s)
{
if (errno)
Received on Wed Apr 08 2015 - 16:33:02 CEST
This archive was generated by hypermail 2.3.0
: Wed Apr 08 2015 - 16:36:14 CEST