constify parse_options parameter like it is done in wine
authorChristoph von Wittich <christoph_vw@reactos.org>
Fri, 18 Jan 2008 19:14:30 +0000 (19:14 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Fri, 18 Jan 2008 19:14:30 +0000 (19:14 +0000)
svn path=/trunk/; revision=31877

reactos/lib/3rdparty/libwine/debug.c

index b9429ee..845f6f9 100644 (file)
@@ -134,11 +134,12 @@ static void add_option( const char *name, unsigned char set, unsigned char clear
 }
 
 /* parse a set of debugging option specifications and add them to the option list */
-static void parse_options( char *options )
+static void parse_options( const char *str )
 {
-    char *opt, *next;
+    char *opt, *next, *options;
     unsigned int i;
 
+    if (!(options = _strdup(str))) return;
     for (opt = options; opt; opt = next)
     {
         const char *p;
@@ -178,6 +179,7 @@ static void parse_options( char *options )
         else
             add_option( p, set, clear );
     }
+    free( options );
 }
 
 /* initialize all options at startup */