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
@@ -61,9 +61,7 @@ ostree_builtin_checksum (int argc, char **argv, GFile *repo_path_path, GCancella
GOptionContext *context;
gboolean ret = FALSE;
gs_unref_object GFile *f = NULL;
AsyncChecksumData data;
memset (&data, 0, sizeof (data));
AsyncChecksumData data = { 0, };
context = g_option_context_new ("FILENAME - Checksum a file or directory");
g_option_context_add_main_entries (context, options, NULL);