[vlc-commits] luarc: simplify

Pierre Ynard git at videolan.org
Tue Mar 15 21:51:30 CET 2011


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Tue Mar 15 21:51:35 2011 +0100| [fd56030a74c46f10fe5cecdf2a3cfda1b2831ee9] | committer: Pierre Ynard

luarc: simplify

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

 share/lua/intf/rc.lua |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/share/lua/intf/rc.lua b/share/lua/intf/rc.lua
index 26f129e..e780048 100644
--- a/share/lua/intf/rc.lua
+++ b/share/lua/intf/rc.lua
@@ -608,8 +608,7 @@ end
 function call_libvlc_command(cmd,client,arg)
     local ok, vlcerr = pcall( vlc.var.libvlc_command, cmd, arg )
     if not ok then
-        local a = arg or ""
-        if a ~= "" then a = " " .. a end
+        local a = arg and " "..arg or ""
         client:append("Error in `"..cmd..a.."' ".. vlcerr) -- when pcall fails, the 2nd arg is the error message.
     end
     return vlcerr



More information about the vlc-commits mailing list