Mercurial > pidgin
changeset 3930:22e3bbbd9a32
[gaim-migrate @ 4102]
So at some point gaim_user_dir() changed so that it returned a static
buffer instead of some sort of fancy "dynamic" whizbang. So this just
keeps the thing from segfaulting when you try to load it.
Oh, and, uh, I don't actually use this. Honest I don't. I'm not really
sure what it's supposed to do. It would be nice if it were gtk2ized,
though.
There is a big teddy bear on my desk. It's soft and fluffy.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 08 Nov 2002 07:51:28 +0000 |
parents | f0efc0293bbf |
children | 98faba851ea9 |
files | plugins/chatlist.c |
diffstat | 1 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/chatlist.c Fri Nov 08 07:42:16 2002 +0000 +++ b/plugins/chatlist.c Fri Nov 08 07:51:28 2002 +0000 @@ -99,16 +99,13 @@ g_snprintf(path, sizeof(path), "%s/%s", x, "chats"); f = fopen(path, "w"); - if (!f) { - g_free(x); + if (!f) return; - } while (crs) { struct chat_room *cr = crs->data; crs = crs->next; fprintf(f, "%s\n%d\n", cr->name, cr->exchange); } - g_free(x); fclose(f); } @@ -121,10 +118,8 @@ g_snprintf(path, sizeof(path), "%s/%s", x, "chats"); f = fopen(path, "r"); - if (!f) { - g_free(x); + if (!f) return; - } while (fgets(buf, 1024, f)) { struct chat_room *cr = g_new0(struct chat_room, 1); g_snprintf(cr->name, sizeof(cr->name), "%s", g_strchomp(buf));