# HG changeset patch # User Mark Doliner # Date 1121996959 0 # Node ID ee059fe9b3620e6ca7a681154470d1d27bd4fec5 # Parent 7d2dae6e585fa44ef1c24c3643157f6c54bd2799 [gaim-migrate @ 13206] Who wrote this? committer: Tailor Script diff -r 7d2dae6e585f -r ee059fe9b362 src/util.c --- 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 *