Mercurial > pidgin
comparison src/log.c @ 14035:8bda65b88e49
[gaim-migrate @ 16638]
A bunch of small changes. Mostly remove "if not null" checks before
calling g_free, g_list_free, g_slist_free and g_strdup. Also use
g_list_foreach() to call g_free to free strings in an array. And
some whitespace changes here and there.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 05 Aug 2006 08:27:39 +0000 |
parents | c17dd38c562d |
children |
comparison
equal
deleted
inserted
replaced
14034:0839a7b71325 | 14035:8bda65b88e49 |
---|---|
108 char *tmp = g_locale_from_utf8(log->tm->tm_zone, -1, NULL, NULL, NULL); | 108 char *tmp = g_locale_from_utf8(log->tm->tm_zone, -1, NULL, NULL, NULL); |
109 if (tmp != NULL) | 109 if (tmp != NULL) |
110 log->tm->tm_zone = tmp; | 110 log->tm->tm_zone = tmp; |
111 else | 111 else |
112 /* Just shove the UTF-8 bytes in and hope... */ | 112 /* Just shove the UTF-8 bytes in and hope... */ |
113 log->tm->tm_zone = (char *)g_strdup(log->tm->tm_zone); | 113 log->tm->tm_zone = g_strdup(log->tm->tm_zone); |
114 } | 114 } |
115 #endif | 115 #endif |
116 } | 116 } |
117 | 117 |
118 if (log->logger && log->logger->create) | 118 if (log->logger && log->logger->create) |
851 | 851 |
852 /* Find all the accounts for protocol. */ | 852 /* Find all the accounts for protocol. */ |
853 for (account_iter = gaim_accounts_get_all() ; account_iter != NULL ; account_iter = account_iter->next) { | 853 for (account_iter = gaim_accounts_get_all() ; account_iter != NULL ; account_iter = account_iter->next) { |
854 GaimPlugin *prpl; | 854 GaimPlugin *prpl; |
855 GaimPluginProtocolInfo *prpl_info; | 855 GaimPluginProtocolInfo *prpl_info; |
856 | 856 |
857 prpl = gaim_find_prpl(gaim_account_get_protocol_id((GaimAccount *)account_iter->data)); | 857 prpl = gaim_find_prpl(gaim_account_get_protocol_id((GaimAccount *)account_iter->data)); |
858 if (!prpl) | 858 if (!prpl) |
859 continue; | 859 continue; |
860 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl); | 860 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl); |
861 | 861 |
1279 { | 1279 { |
1280 GaimLogCommonLoggerData *data = log->logger_data; | 1280 GaimLogCommonLoggerData *data = log->logger_data; |
1281 if (data) { | 1281 if (data) { |
1282 if(data->file) | 1282 if(data->file) |
1283 fclose(data->file); | 1283 fclose(data->file); |
1284 if(data->path) | 1284 g_free(data->path); |
1285 g_free(data->path); | |
1286 | 1285 |
1287 g_slice_free(GaimLogCommonLoggerData, data); | 1286 g_slice_free(GaimLogCommonLoggerData, data); |
1288 } | 1287 } |
1289 } | 1288 } |
1290 | 1289 |