Use { 0, } for structure initialization rather than memset()

It's cleaner, safer, and I had a totally wrong idea stuck in my head
about why memset() should be used.

https://bugzilla.gnome.org/show_bug.cgi?id=705968
This commit is contained in:
Colin Walters committed 2013-08-18 07:20:46 -04:00
1 parent 5f90502482
commit eaee309112
6 files changed
+7 -19

No files matched your search

+1 -3
View File
@@ -103,11 +103,9 @@ ostree_repo_prune (OstreeRepo *repo,
gs_unref_hashtable GHashTable *objects = NULL;
gs_unref_hashtable GHashTable *all_refs = NULL;
gs_free char *formatted_freed_size = NULL;
OtPruneData data;
OtPruneData data = { 0, };
gboolean refs_only = flags & OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY;
memset (&data, 0, sizeof (data));
data.repo = repo;
data.reachable = ostree_repo_traverse_new_reachable ();