Ethereal-dev: [Ethereal-dev] interface options patch II

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

From: Nathan Jennings <njen@xxxxxxxxxxxxx>
Date: Tue, 09 Sep 2003 09:48:20 -0400
Hello,

Here's another small patch that fixes a problem when there are "empty" descriptions (should have dup'd empty string).

-Nathan
--- gtk/capture_prefs.c	Tue Sep  9 09:35:06 2003
+++ gtk/capture_prefs.c	Tue Sep  9 09:20:07 2003
@@ -731,7 +731,7 @@
 			/* set interface name */
 			text[0] = g_strdup(ifname);
 			/* set empty description */
-			text[1] = NULL;
+			text[1] = g_strdup("");
 			/* check if interface is "hidden" */
 			if (prefs.capture_devices_hide != NULL) {
 				if (strstr(prefs.capture_devices_hide, ifname) != NULL)
@@ -756,7 +756,7 @@
 		/* set interface name */
 		text[0] = g_strdup(ifname);
 		/* set empty description */
-		text[1] = NULL;
+		text[1] = g_strdup("");
 		/* check if interface is "hidden" */
 		if (strstr(prefs.capture_devices_hide, ifname) != NULL)
 			text[2] = g_strdup("1");
@@ -774,7 +774,7 @@
 		/* set interface name */
 		text[0] = g_strdup(ifname);
 		/* set empty description */
-		text[1] = NULL;
+		text[1] = g_strdup("");
 		/* interface is not "hidden" */
 		text[2] = g_strdup("0");