GNOME Bugzilla – Bug 731584
gbookmarkfile: Cleaner error handling code to pacify static analysis
Last modified: 2014-06-12 17:25:22 UTC
A static analyzer flagged the g_file_get_contents() call as not checking its return value. While the code here is actually correct, it's verbose at best. I think the "goto out + cleanup" code style is substantially cleaner, less error prone, and easier to read. It also will pacify the static analyzer.
Created attachment 278357 [details] [review] gbookmarkfile: Cleaner error handling code to pacify static analysis
Review of attachment 278357 [details] [review]: looks good, with one minor coding style tweak; if you could fix it before pushing it would be great... ::: glib/gbookmarkfile.c @@ +1686,1 @@ + if (!g_bookmark_file_load_from_data (bookmark, the arguments can go on the same line.
Attachment 278357 [details] pushed as f7d7e5a - gbookmarkfile: Cleaner error handling code to pacify static analysis