Mercurial > pidgin.yaz
changeset 11142:ee059fe9b362
[gaim-migrate @ 13206]
Who wrote this?
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 22 Jul 2005 01:49:19 +0000 |
parents | 7d2dae6e585f |
children | 5c56223fa24f |
files | src/util.c |
diffstat | 1 files changed, 3 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/util.c Thu Jul 21 19:29:36 2005 +0000 +++ b/src/util.c Fri Jul 22 01:49:19 2005 +0000 @@ -2437,19 +2437,14 @@ gaim_str_strip_cr(char *text) { int i, j; - char *text2; g_return_if_fail(text != NULL); - text2 = g_malloc(strlen(text) + 1); - for (i = 0, j = 0; text[i]; i++) if (text[i] != '\r') - text2[j++] = text[i]; - text2[j] = '\0'; - - strcpy(text, text2); - g_free(text2); + text[j++] = text[i]; + + text[j++] = '\0'; } gchar *