summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Shadura <andrewsh@debian.org>2021-01-04 18:28:18 +0100
committerAndrej Shadura <andrewsh@debian.org>2021-01-21 12:35:32 +0100
commitd121d112d34045652138215d531c2f44f76f54b4 (patch)
tree49c02f9342845c30e46af281943c475658e5d3fd
parent0aee4f3e9464c2b76af18ddc1be85e1e7a9cd46b (diff)
Allocate mixerdevice only once
Gbp-Pq: Name 14-allocate-mixerdevice-only-once.patch
-rw-r--r--src/osdsh/controlsh.c6
-rw-r--r--src/osdsh/osdsh.c1
-rw-r--r--src/osdsh/osdsh.h2
3 files changed, 2 insertions, 7 deletions
diff --git a/src/osdsh/controlsh.c b/src/osdsh/controlsh.c
index da00aa4..4c9115b 100644
--- a/src/osdsh/controlsh.c
+++ b/src/osdsh/controlsh.c
@@ -15,9 +15,6 @@ int load_plugin( char pluginfile[255])
char file[PATH_MAX+256];
char *msg = NULL;
- char **mod_mixerdev;
-
-
/* getcwd(file, PATH_MAX);
strcat(file, "/");
*/
@@ -43,9 +40,6 @@ int load_plugin( char pluginfile[255])
info = dlsym(module, "mynameis");
- mod_mixerdev = dlsym(module, "mixerdevice");
- *mod_mixerdev = mixerdevice;
-
plugins[a].module = module;
plugins[a].whoami = a;
plugins[a].file = file;
diff --git a/src/osdsh/osdsh.c b/src/osdsh/osdsh.c
index 0dd30fc..a3e0654 100644
--- a/src/osdsh/osdsh.c
+++ b/src/osdsh/osdsh.c
@@ -1,6 +1,7 @@
#include "osdsh.h"
#include "../config.h"
+char mixerdevice[PATH_MAX + 1];
/* ==============================global variables=============================*/
/*
diff --git a/src/osdsh/osdsh.h b/src/osdsh/osdsh.h
index 62802be..5297cce 100644
--- a/src/osdsh/osdsh.h
+++ b/src/osdsh/osdsh.h
@@ -46,4 +46,4 @@ typedef struct plugininfo_t {
} plugininfo_t;
/* HACK */
-char mixerdevice[PATH_MAX + 1];
+extern char mixerdevice[PATH_MAX + 1];