Mercurial > hg > xmms-sid
diff src/xs_support.c @ 57:85811bcd049e
Improved, re-written configuration code and lots of minor fixes
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 22 Jun 2003 11:01:03 +0000 |
parents | 6a3ce7260ae1 |
children | 94497283affa |
line wrap: on
line diff
--- a/src/xs_support.c Sun Jun 22 00:17:04 2003 +0000 +++ b/src/xs_support.c Sun Jun 22 11:01:03 2003 +0000 @@ -60,24 +60,15 @@ } -int xs_strpcat(gchar **ppcResult, gint *j, const gchar *pcStr) +gint xs_strpcat(gchar *pcResult, gint *j, const gchar *pcStr) { - int iLen; - - assert(ppcResult); + assert(pcResult); assert(pcStr); assert(j); - /* Get length of the pcString to be catted */ - iLen = strlen(pcStr); - (*j) += iLen; - - /* Re-allocate memory for destination */ - *ppcResult = (gchar *) g_realloc(*ppcResult, strlen(*ppcResult) + iLen + 1); - if (*ppcResult == NULL) return -1; - /* Cat to the destination */ - strcat(*ppcResult, pcStr); + strcpy((pcResult+(*j)), pcStr); + (*j) += strlen(pcStr); return 0; }