[netperf-dev] netperf4 commit notice r104 - branches/glib_migration/src

raj at netperf.org raj at netperf.org
Fri Mar 24 15:49:12 PST 2006


Author: raj
Date: 2006-03-24 15:49:11 -0800 (Fri, 24 Mar 2006)
New Revision: 104

Modified:
   branches/glib_migration/src/netperf.c
Log:
Use g_stat rather than stat, and nuke the last reference to optarg


Modified: branches/glib_migration/src/netperf.c
===================================================================
--- branches/glib_migration/src/netperf.c	2006-03-24 23:44:19 UTC (rev 103)
+++ branches/glib_migration/src/netperf.c	2006-03-24 23:49:11 UTC (rev 104)
@@ -240,7 +240,7 @@
     g_fprintf(where,
 	      "%s: cannot open %s for reading\n",
 	      program_name,
-	      optarg);
+	      option_value);
     fflush(where);
     exit(1);
   } 
@@ -292,10 +292,10 @@
   }
   if (fname == NULL) {
     if (!xmlStrcmp(doctype,(const xmlChar *)"netperf")) {
-      if (0 == stat("default_config.xml",&buf)) {
+      if (0 == g_stat("default_config.xml",&buf)) {
 	fname = "default_config.xml";
       }
-      else if (0 == stat(NETPERFDIR NETPERF_PATH_SEP "default_config.xml",
+      else if (0 == g_stat(NETPERFDIR NETPERF_PATH_SEP "default_config.xml",
 			 &buf)) {
 	fname = NETPERFDIR NETPERF_PATH_SEP "default_config.xml";
       }
@@ -304,10 +304,10 @@
       }
     }
     if (!xmlStrcmp(doctype,(const xmlChar *)"commands")) {
-      if (0 == stat("default_commands.xml",&buf)) {
+      if (0 == g_stat("default_commands.xml",&buf)) {
 	fname = "default_commands.xml";
       }
-      else if (0 == stat(NETPERFDIR NETPERF_PATH_SEP "default_commands.xml",
+      else if (0 == g_stat(NETPERFDIR NETPERF_PATH_SEP "default_commands.xml",
 			 &buf)) {
 	fname = NETPERFDIR NETPERF_PATH_SEP "default_commands.xml";
       }



More information about the netperf-dev mailing list