Skip site navigation (1)Skip section navigation (2)
Date:      18 Dec 2000 14:31:21 +0100
From:      Assar Westerlund <assar@FreeBSD.org>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/libkern strlcat.c strlcpy.c src/sys/sys libkern.h src/sys/conf files
Message-ID:  <5l66khluty.fsf@assaris.sics.se>
In-Reply-To: Dag-Erling Smorgrav's message of "18 Dec 2000 11:39:54 %2B0100"
References:  <200012180408.eBI48wg99879@freefall.freebsd.org> <xzpu282ypvp.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smorgrav <des@ofug.org> writes:
> Assar Westerlund <assar@FreeBSD.org> writes:
> >   Log:
> >   add strlcpy and strlcat to kernel
> 
> Please back this out

backed out.

> and think about how you can implement strlcat() and strlcpy() in
> much less code

Is that really something worth optimizing?  And isn't it worth
something having the same implementation of these functions as in libc?

> and avoid duplicating strcat() and strcpy(), as I already pointed
> out on -arch.

static __inline char *
strcat(char *dst, const char *src)
{
	return (strlcat(dst, src, UINT_MAX));
}


static __inline char *
strcpy(char *dst, const char *dst)
{
	return (strlcpy(dst, src, UINT_MAX));
}

But that's an API change for kernel modules and something that should
be decided on doing before burning the bring.

/assar


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5l66khluty.fsf>