Description: Fix varargs handling to build on armhf
 NULL is not a valid va_list value, and armhf for example fails to build with
 it. Pass an empty list in that case.
Author: Marcin Owsiany <porridge@harris.debian.org>
Bug-Debian: http://bugs.debian.org/618716

--- ekg2-0.4~pre+20120506.1.orig/ekg/sources.c
+++ ekg2-0.4~pre+20120506.1/ekg/sources.c
@@ -74,13 +74,22 @@ static ekg_source_t source_new(plugin_t
 
 	s->plugin = plugin;
 	/* XXX: temporary */
-	s->name = args ? g_strdup_vprintf(name_format, args) : g_strdup(name_format);
+	s->name = g_strdup_vprintf(name_format, args);
 	s->priv_data = data;
 	s->destr = destr;
 	
 	return s;
 }
 
+static ekg_source_t source_new_va(plugin_t *plugin, const gchar *name_format, gpointer data, GDestroyNotify destr, ...) {
+	va_list ap;
+	struct ekg_source *s;
+	va_start(ap, destr);
+	s = source_new(plugin, name_format, data, destr, ap);
+	va_end(ap);
+	return s;
+}
+
 static void source_set_id(struct ekg_source *s, guint id) {
 	s->id = id;
 	if (!s->name)
@@ -325,7 +334,7 @@ static gboolean timer_wrapper_old(gpoint
 }
 
 ekg_timer_t timer_add_ms(plugin_t *plugin, const gchar *name, guint period, gboolean persist, gint (*function)(gint, gpointer), gpointer data) {
-	struct ekg_source *t = source_new(plugin, name, data, NULL, NULL);
+	struct ekg_source *t = source_new_va(plugin, name, data, NULL);
 
 	t->handler.as_old_timer = function;
 	t->details.as_timer.interval = period;
