Ethereal-dev: [Ethereal-dev] [0.10.9] C89 fix for plugins/mate/mate_setup.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Thu, 3 Feb 2005 15:53:18 -0600
The HP-UX compilers don't like non-constant initializers (C99'ism).
Patch attached for plugins/mate/mate_setup.c.

-- 
albert chin (china@xxxxxxxxxxxxxxxxxx)

-- snip snip
--- plugins/mate/mate_setup.c.orig	2005-02-03 12:53:28.000000000 -0600
+++ plugins/mate/mate_setup.c	2005-02-03 12:58:39.000000000 -0600
@@ -1158,14 +1158,17 @@
 static void new_attr_hfri(mate_cfg_item* cfg, guint8* name) {
 	int* p_id = g_malloc(sizeof(int));
 
-	hf_register_info hfri = {
-		p_id,
-	{
-		g_strdup_printf("%s",name),
-		g_strdup_printf("mate.%s.%s",cfg->name,name),
-		FT_STRING,BASE_NONE,NULL,0,
-		g_strdup_printf("%s attribute of %s",name,cfg->name),HFILL
-	}};
+	hf_register_info hfri;
+
+	hfri.p_id = p_id;
+	hfri.hfinfo.name = g_strdup_printf("%s",name);
+	hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.%s",cfg->name,name);
+	hfri.hfinfo.type = FT_STRING;
+	hfri.hfinfo.display = BASE_NONE;
+	hfri.hfinfo.strings = NULL;
+	hfri.hfinfo.bitmask = 0;
+	hfri.hfinfo.blurb = g_strdup_printf("%s attribute of %s",name,cfg->name);
+	hfri.hfinfo.id = HFILL;
 
 	*p_id = -1;
 	g_hash_table_insert(cfg->my_hfids,name,p_id);