Revision: 5221 http://geany.svn.sourceforge.net/geany/?rev=5221&view=rev Author: ntrel Date: 2010-09-09 17:21:05 +0000 (Thu, 09 Sep 2010)
Log Message: ----------- Remove NULL checks when calling g_free() (patch Erik de Castro Lopo, thanks).
Modified Paths: -------------- trunk/ChangeLog trunk/src/encodings.c trunk/src/highlighting.c trunk/tagmanager/tm_file_entry.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-09-09 17:07:12 UTC (rev 5220) +++ trunk/ChangeLog 2010-09-09 17:21:05 UTC (rev 5221) @@ -14,6 +14,9 @@ * doc/geany.txt, doc/geany.html: Mention the filetype wordchars setting can be overridden by the whitespace_chars filetypes.common setting. + * src/highlighting.c, src/encodings.c, tagmanager/tm_file_entry.c: + Remove NULL checks when calling g_free() (patch Erik de Castro + Lopo, thanks).
2010-09-09 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
Modified: trunk/src/encodings.c =================================================================== --- trunk/src/encodings.c 2010-09-09 17:07:12 UTC (rev 5220) +++ trunk/src/encodings.c 2010-09-09 17:21:05 UTC (rev 5221) @@ -488,8 +488,7 @@ geany_debug("Couldn't convert from %s to UTF-8.", charset);
utf8_content = NULL; - if (converted_contents != NULL) - g_free(converted_contents); + g_free(converted_contents); } else {
Modified: trunk/src/highlighting.c =================================================================== --- trunk/src/highlighting.c 2010-09-09 17:07:12 UTC (rev 5220) +++ trunk/src/highlighting.c 2010-09-09 17:21:05 UTC (rev 5221) @@ -436,8 +436,7 @@ if (named_style_hash) g_hash_table_destroy(named_style_hash);
- if (style_sets) - g_free(style_sets); + g_free(style_sets); }
Modified: trunk/tagmanager/tm_file_entry.c =================================================================== --- trunk/tagmanager/tm_file_entry.c 2010-09-09 17:07:12 UTC (rev 5220) +++ trunk/tagmanager/tm_file_entry.c 2010-09-09 17:21:05 UTC (rev 5221) @@ -238,8 +238,7 @@ } closedir(dir); entry->children = g_slist_sort(entry->children, (GCompareFunc) tm_file_entry_compare); - if (entries) - g_free(entries); + g_free(entries); break; } return entry; @@ -257,8 +256,7 @@ tm_file_entry_free(tmp->data); g_slist_free(file_entry->children); } - if (file_entry->version) - g_free(file_entry->version); + g_free(file_entry->version); g_free(file_entry->path); FILE_FREE(file_entry); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.