sbase

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

commit dd395693d40f01a4634a73fc74b358c60c641d1b
parent 403b047a3043000953241ffd5fc67437e9ba117e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Tue,  7 Apr 2015 19:08:53 +0200

sed: remove unused strnacpy()

Diffstat:
Msed.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)