programs/winetest cosmetics

Ferenc Wagner wferi at afavant.elte.hu
Thu Feb 19 22:38:05 CST 2004


ChangeLog: add a free() call at the end.

Index: main.c
===================================================================
RCS file: /home/wine/wine/programs/winetest/main.c,v
retrieving revision 1.3
diff -u -r1.3 main.c
--- main.c	19 Feb 2004 04:12:42 -0000	1.3
+++ main.c	20 Feb 2004 04:36:12 -0000
@@ -258,7 +258,7 @@
     return TRUE;
 }
 
-static const char *
+char *
 run_tests (const char *logname, const char *tag)
 {
     int nr_of_files = 0, nr_of_tests = 0, i;
@@ -338,7 +338,7 @@
     free (tempdir);
     free (wine_tests);
 
-    return logname;
+    return (char *)logname;     /* discard const qualifier */
 }
 
 void
@@ -357,9 +357,9 @@
 int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
                     LPSTR cmdLine, int cmdShow)
 {
-    const char *logname = NULL;
+    char *logname = NULL;
     char *tag = NULL, *cp;
-    char *submit = NULL;
+    const char *submit = NULL;
 
     cmdLine = strtok (cmdLine, " ");
     while (cmdLine) {
@@ -417,6 +417,7 @@
                 report (R_FATAL, "Can't submit logfile '%s'", logname);
         if (remove (logname))
             report (R_WARNING, "Can't remove logfile: %d.", errno);
+        free (logname);
         report (R_STATUS, "Finished");
     }
     exit (0);



More information about the wine-patches mailing list