treewide: replace memset to 0 with initializers
[collectd.git] / src / curl_json.c
index 55db387..2dac747 100644 (file)
@@ -760,7 +760,7 @@ static int cj_config_add_url (oconfig_item_t *ci) /* {{{ */
   /* If all went well, register this database for reading */
   if (status == 0)
   {
-    user_data_t ud;
+    user_data_t ud = { 0 };
     char *cb_name;
 
     if (db->instance == NULL)
@@ -769,7 +769,6 @@ static int cj_config_add_url (oconfig_item_t *ci) /* {{{ */
     DEBUG ("curl_json plugin: Registering new read callback: %s",
            db->instance);
 
-    memset (&ud, 0, sizeof (ud));
     ud.data = (void *) db;
     ud.free_func = cj_free;