[Frugalware-darcs] fw-control-center: gnetconfig: no need of using switchcase for checking the dhcpclient combo.

Priyank priyank at frugalware.org
Tue Jun 26 11:17:47 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=fw-control-center;a=darcs_commitdiff;h=20070626091619-5ce2c-63b18ab8f6791bab4db99c06ccddf047800f505d.gz;

[gnetconfig: no need of using switchcase for checking the dhcpclient combo.
Priyank <priyank at frugalware.org>**20070626091619] {
hunk ./gnetconfig/src/gnetconfig-new_interface.c 288
-			switch (gtk_combo_box_get_active (GTK_COMBO_BOX(gn_ndhcp_client_combo)))
-			{
-				case GN_DHCPCD:
-					snprintf (nif->dhcpclient, PATH_MAX, "dhcpcd");
-					break;
-				case GN_DHCLIENT:
-					snprintf (nif->dhcpclient, PATH_MAX, "dhclient");
-					break;
-				default:
-					*nif->dhcpclient = '\0';
-			}
+			if (gtk_combo_box_get_active (GTK_COMBO_BOX(gn_ndhcp_client_combo)) == GN_DHCPCD)
+				snprintf (nif->dhcpclient, PATH_MAX, "dhcpcd");
+			else
+				snprintf (nif->dhcpclient, PATH_MAX, "dhclient");
}


More information about the Frugalware-darcs mailing list