[gjs] console: Fix wrong cast in coverage prefixes



commit 735d81695710d2c705783aaf14457ed415f3541e
Author: Philip Chimento <philip chimento gmail com>
Date:   Mon Nov 14 23:04:15 2016 -0800

    console: Fix wrong cast in coverage prefixes
    
    I'm not sure what I was thinking here, but env_coverage_prefixes is a
    string, not a strv, and needs to be split up.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=772033

 gjs/console.cpp |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gjs/console.cpp b/gjs/console.cpp
index d60840b..1ebfe2e 100644
--- a/gjs/console.cpp
+++ b/gjs/console.cpp
@@ -255,13 +255,9 @@ main(int argc, char **argv)
 
     env_coverage_prefixes = g_getenv("GJS_COVERAGE_PREFIXES");
     if (env_coverage_prefixes != NULL) {
-        if (coverage_prefixes == NULL) {
-            coverage_prefixes = g_strdupv((char **) env_coverage_prefixes);
-        } else {
-            char **env_prefixes = g_strsplit(env_coverage_prefixes, ":", -1);
+        if (coverage_prefixes != NULL)
             g_strfreev(coverage_prefixes);
-            coverage_prefixes = env_prefixes;
-        }
+        coverage_prefixes = g_strsplit(env_coverage_prefixes, ":", -1);
     }
 
     if (coverage_prefixes) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]