summaryrefslogtreecommitdiffstats
path: root/src/dso.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dso.c')
-rw-r--r--src/dso.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/dso.c b/src/dso.c
index a302b27..5ff0fec 100644
--- a/src/dso.c
+++ b/src/dso.c
@@ -152,7 +152,6 @@ static int try_open(ca_context *c, const char *t) {
int driver_open(ca_context *c) {
int ret;
struct private_dso *p;
- const char *d;
ca_return_val_if_fail(c, CA_ERROR_INVALID);
ca_return_val_if_fail(!PRIVATE_DSO(c), CA_ERROR_STATE);
@@ -168,12 +167,9 @@ int driver_open(ca_context *c) {
p->ltdl_initialized = TRUE;
- if (!(d = c->driver))
- d = getenv("CANBERRA_DRIVER");
+ if (c->driver) {
- if (d) {
-
- if ((ret = try_open(c, d)) < 0) {
+ if ((ret = try_open(c, c->driver)) < 0) {
driver_destroy(c);
return ret;
}