[vlc-commits] libvlc: do not create pidfile variable pointlessly

Rémi Denis-Courmont git at videolan.org
Thu May 31 21:03:44 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May 31 21:54:01 2018 +0300| [75dd0452bfad88802fc5a925ce433f94060fe79a] | committer: Rémi Denis-Courmont

libvlc: do not create pidfile variable pointlessly

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=75dd0452bfad88802fc5a925ce433f94060fe79a
---

 src/interface/interface.c | 5 +----
 src/libvlc.c              | 5 -----
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/interface/interface.c b/src/interface/interface.c
index 6155d5ab7c..ed45a58017 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -214,10 +214,7 @@ int libvlc_InternalAddIntf(libvlc_int_t *libvlc, const char *name)
         if (intf == NULL) /* "intf" has not been set */
         {
 #if !defined(_WIN32) && !defined(__OS2__)
-            char *pidfile = var_InheritString(libvlc, "pidfile");
-            if (pidfile != NULL)
-                free(pidfile);
-            else
+            if (!var_InheritBool(libvlc, "daemon"))
 #endif
                 msg_Info(libvlc, _("Running vlc with the default interface. "
                          "Use 'cvlc' to use vlc without interface."));
diff --git a/src/libvlc.c b/src/libvlc.c
index f6bb02b6e1..e526b9d85d 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -206,11 +206,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
             free( pidfile );
         }
     }
-    else
-    {
-        var_Create( p_libvlc, "pidfile", VLC_VAR_STRING );
-        var_SetString( p_libvlc, "pidfile", "" );
-    }
 #endif
 
     i_ret = VLC_ENOMEM;



More information about the vlc-commits mailing list