Revert r5532, r5536 and a piece of r5531.

The use of strncat and strndup was correct, pstrcpy and pstrdup wasn't.
I'll try to restore building on non-gnu OSes in a later commit.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5651 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
balrog 2008-11-08 23:57:26 +00:00
parent 4fc9af53d8
commit 793a10a2d4
3 changed files with 5 additions and 18 deletions

View file

@ -50,18 +50,6 @@ char *pstrcat(char *buf, int buf_size, const char *s)
return buf;
}
/* strdup with a limit */
char *pstrdup(const char *str, size_t buf_size)
{
size_t len;
char *buf;
len = MIN(buf_size, strlen(str));
buf = qemu_malloc(len);
pstrcpy(buf, len, str);
return buf;
}
int strstart(const char *str, const char *val, const char **ptr)
{
const char *p, *q;