mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
Add some g_return checks to gvdb_table_write_contents()
I'm not auditing all the public functions in this file for precondition checks, but since I'm adding an async version of this function, it makes sense to ensure there are matching checks for the sync version.
This commit is contained in:
parent
d12c5aaba8
commit
16fb81cd7e
@ -511,6 +511,10 @@ gvdb_table_write_contents (GHashTable *table,
|
||||
FileBuilder *fb;
|
||||
GString *str;
|
||||
|
||||
g_return_val_if_fail (table != NULL, FALSE);
|
||||
g_return_val_if_fail (filename != NULL, FALSE);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
|
||||
fb = file_builder_new (byteswap);
|
||||
file_builder_add_hash (fb, table, &root);
|
||||
str = file_builder_serialise (fb, root);
|
||||
|
Loading…
Reference in New Issue
Block a user