Code

lirc: pass writable string to lirc_init()
authorMax Kellermann <max@duempel.org>
Fri, 7 Nov 2008 07:16:46 +0000 (08:16 +0100)
committerMax Kellermann <max@duempel.org>
Fri, 7 Nov 2008 07:16:46 +0000 (08:16 +0100)
The "prog" argument of lirc_init() expects a non-const string.
Pass a local string variable.

src/lirc.c

index 0ad34ca2f476402f9c80327432e0bd957bcb0db5..4e7e423d115055776cc4beb81de8a6d34579b85c 100644 (file)
@@ -6,7 +6,9 @@ static int lirc_socket = 0;
 
 int ncmpc_lirc_open()
 {
-       if ((lirc_socket = lirc_init("ncmpc", 0)) == -1)
+       char prog[] = "ncmpc";
+
+       if ((lirc_socket = lirc_init(prog, 0)) == -1)
                return -1;
 
        if (lirc_readconfig(NULL, &lc, NULL)) {