From 84ad9a40a647b97551bc8bc35f082bd82e8b8c92 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 30 Jan 2008 15:01:37 +0000 Subject: Use the variable instead of type for sizeof. --- src/rc/rc-plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rc/rc-plugin.c') diff --git a/src/rc/rc-plugin.c b/src/rc/rc-plugin.c index 635e52fb..29bd43c2 100644 --- a/src/rc/rc-plugin.c +++ b/src/rc/rc-plugin.c @@ -111,15 +111,15 @@ void rc_plugin_load (void) dlclose (h); } else { if (plugin) { - plugin->next = xmalloc (sizeof (plugin_t)); + plugin->next = xmalloc (sizeof (*plugin->next)); plugin = plugin->next; } else - plugin = plugins = xmalloc (sizeof (plugin_t)); + plugin = plugins = xmalloc (sizeof (*plugin)); - memset (plugin, 0, sizeof (plugin_t)); plugin->name = xstrdup (d->d_name); plugin->handle = h; plugin->hook = fptr; + plugin->next = NULL; } } closedir (dp); -- cgit v1.2.3