sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 4257db1910c9057cb13985ef370cf51ca1730700
parent 52f3d9b7d4d5e0094c39f601c3d39505bd5c3d22
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Tue Apr  7 19:08:53 +0200

sed: remove unused strnacpy()

Diffstat:
sed.c | 13-------------
1 file changed, 0 insertions(+), 13 deletions(-)
diff --git a/sed.c b/sed.c @@ -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); @@ -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)