GNOME Bugzilla – Bug 747362
Make sure g_daemon_file_query_writable_namespaces() never return NULL
Last modified: 2015-04-10 08:33:42 UTC
This was the intent of b358ca but there is still one case when NULL is returned.
Created attachment 300977 [details] [review] Rework code flow in g_daemon_file_query_writable_namespaces() This makes the common (non-error) case more linear, and thus a bit more readable. This is in preparation for the next commits.
Created attachment 300978 [details] [review] Don't return NULL from g_daemon_file_query_writable_namespaces() Since commit b358ca "Make sure metadata is always returned by query_writable_namespaces()", query_writable_namespaces() is expected to return non-NULL values. There is one error case where it's not currently doing that.
Review of attachment 300977 [details] [review]: Otherwise OK. ::: client/gdaemonfile.c @@ +2609,2 @@ list = g_file_attribute_info_list_new (); + goto end; I'd prefer if this was "out" to be consistent with the rest of the code.
Review of attachment 300978 [details] [review]: Otherwise OK. ::: client/gdaemonfile.c @@ +2595,3 @@ + { + list = g_file_attribute_info_list_new (); + goto end; I'd prefer if this was "out" to be consistent with the rest of the code.
Created attachment 301047 [details] [review] Rework code flow in g_daemon_file_query_writable_namespaces() This makes the common (non-error) case more linear, and thus a bit more readable. This is in preparation for the next commits.
Created attachment 301048 [details] [review] Don't return NULL from g_daemon_file_query_writable_namespaces() Since commit b358ca "Make sure metadata is always returned by query_writable_namespaces()", query_writable_namespaces() is expected to return non-NULL values. There is one error case where it's not currently doing that.
Review of attachment 301047 [details] [review]: Looks good.
Review of attachment 301048 [details] [review]: Looks good.
Attachment 301047 [details] pushed as 090543f - Rework code flow in g_daemon_file_query_writable_namespaces() Attachment 301048 [details] pushed as faa2b07 - Don't return NULL from g_daemon_file_query_writable_namespaces()