[Openvas-commits] r5637 - in trunk/openvas-client: . openvas

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Oct 20 09:51:25 CEST 2009


Author: felix
Date: 2009-10-20 09:51:23 +0200 (Tue, 20 Oct 2009)
New Revision: 5637

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/openvas/openvas_plugin.c
Log:
* openvas/openvas_plugin.c: Cosmetics.


Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2009-10-20 07:42:26 UTC (rev 5636)
+++ trunk/openvas-client/ChangeLog	2009-10-20 07:51:23 UTC (rev 5637)
@@ -1,3 +1,17 @@
+2009-10-20  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+	* openvas/openvas_plugin.c: Cosmetics.
+
+2009-10-20  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+	* openvas/plugin_infos.c: Cosmetics.
+	(spin_to_timeout): Changed type of local variable to gchar, added todo
+	about mem leak.
+
+	* openvas/report.c (report_save): Major reformatting.
+
+	* openvas/prefs_dialog/prefs_dialog_auth.c: Documentation.
+
 2009-10-19  Michael Wiegand <michael.wiegand at intevation.de>
 
 	Post-release version bump.

Modified: trunk/openvas-client/openvas/openvas_plugin.c
===================================================================
--- trunk/openvas-client/openvas/openvas_plugin.c	2009-10-20 07:42:26 UTC (rev 5636)
+++ trunk/openvas-client/openvas/openvas_plugin.c	2009-10-20 07:51:23 UTC (rev 5637)
@@ -100,11 +100,11 @@
  * @param md5sum New md5sum of a plugin (will be copied).
  */
 void
-openvas_plugin_set_md5sum(struct openvas_plugin * plugin, const char * md5sum)
+openvas_plugin_set_md5sum (struct openvas_plugin * plugin, const char * md5sum)
 {
-  efree(&plugin->md5sum);
+  efree (&plugin->md5sum);
   if (md5sum != NULL)
-    plugin->md5sum = estrdup(md5sum);
+    plugin->md5sum = estrdup (md5sum);
 }
 
 
@@ -125,7 +125,7 @@
 
   while (plugins != NULL)
     {
-      if (nvti_name(plugins->ni) && strcmp (nvti_name(plugins->ni), name) == 0)
+      if (nvti_name(plugins->ni) && strcmp (nvti_name (plugins->ni), name) == 0)
         return plugins;
       plugins = plugins->next;
     }
@@ -136,10 +136,10 @@
 /**
  * @brief Returns the first plugin in the plugin set \<plugins\> with the OID
  * @brief \<oid\>.
- * 
+ *
  * @param plugins List of plugins.
  * @param name    OID of plugin to find.
- * 
+ *
  * @return First plugin in plugin set with given name.
  */
 struct openvas_plugin *
@@ -147,7 +147,9 @@
 {
   while (plugins != NULL)
     {
-      if (!strcmp(plugins->oid, oid)) return plugins;
+      if (!strcmp(plugins->oid, oid))
+        return plugins;
+
       plugins = plugins->next;
     }
 
@@ -166,11 +168,14 @@
 struct openvas_plugin*
 openvas_plugin_duplicate (struct openvas_plugin *plugin)
 {
-  struct openvas_plugin * copy = openvas_plugin_new(plugin->oid,
-      nvti_name(plugin->ni), plugin->category, nvti_copyright(plugin->ni),
-      nvti_description(plugin->ni), nvti_summary(plugin->ni), nvti_family(plugin->ni),
-      nvti_version(plugin->ni), nvti_cve(plugin->ni), nvti_bid(plugin->ni), nvti_xref(plugin->ni), 
-      nvti_sign_key_ids(plugin->ni), nvti_tag(plugin->ni));
+  struct openvas_plugin * copy = openvas_plugin_new (plugin->oid,
+                           nvti_name (plugin->ni), plugin->category,
+                           nvti_copyright (plugin->ni),
+                           nvti_description (plugin->ni),
+                           nvti_summary (plugin->ni), nvti_family (plugin->ni),
+                           nvti_version (plugin->ni), nvti_cve (plugin->ni),
+                           nvti_bid (plugin->ni), nvti_xref (plugin->ni),
+                           nvti_sign_key_ids (plugin->ni), nvti_tag (plugin->ni));
   copy->enabled = plugin->enabled;
   openvas_plugin_set_md5sum(copy, plugin->md5sum);
   if (plugin->plugin_prefs != NULL)



More information about the Openvas-commits mailing list