[sound-juicer/wip/hadess/unescape-proxy-username: 3/6] libjuicer: Mark const variables as such



commit 2f1c82f27c11064ceff6ab5897fb2c5cba32f6ac
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Dec 10 13:18:00 2019 +0100

    libjuicer: Mark const variables as such
    
    And remove free() of const userinfo.

 libjuicer/sj-metadata-getter.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libjuicer/sj-metadata-getter.c b/libjuicer/sj-metadata-getter.c
index 0f87890f..f2f94e47 100644
--- a/libjuicer/sj-metadata-getter.c
+++ b/libjuicer/sj-metadata-getter.c
@@ -110,9 +110,9 @@ set_http_proxy (SjMetadata *metadata,
                 const char *proxy_url)
 {
   GstUri *uri;
-  char *host;
+  const char *host;
   guint port;
-  char *userinfo;
+  const char *userinfo;
   char **user_strv;
 
   uri = gst_uri_from_string (proxy_url);
@@ -149,7 +149,6 @@ set_http_proxy (SjMetadata *metadata,
   }
 
   user_strv = g_strsplit (userinfo, ":", 2);
-  g_free (userinfo);
 
   g_object_set (metadata,
                 "proxy-username", user_strv[0],


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