diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-06-29 16:09:07 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-06-29 16:09:07 +0300 |
commit | d331ef049b55e8a2b43296ef0e1e7d19c19e4cd0 (patch) | |
tree | 95105cf7d54768341942a635043ba08b78ddde50 /src/plugin.c | |
parent | 03a49242f7127aaafdb6cfad30278ef19996f8e8 (diff) | |
download | bluez-d331ef049b55e8a2b43296ef0e1e7d19c19e4cd0.tar.gz |
Remove redundant stat() call
Calling stat() before dlopen() is useless since in theory the file can get
removed between the two calls and so dlopen() needs to be able to handle
ENOENT in any case.
Diffstat (limited to 'src/plugin.c')
-rw-r--r-- | src/plugin.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/plugin.c b/src/plugin.c index a57bf2cbc..706a14f22 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -152,7 +152,6 @@ gboolean plugin_init(GKeyFile *config) struct bluetooth_plugin_desc *desc; void *handle; gchar *filename; - struct stat st; if (g_str_has_prefix(file, "lib") == TRUE || g_str_has_suffix(file, ".so") == FALSE) @@ -163,13 +162,6 @@ gboolean plugin_init(GKeyFile *config) filename = g_build_filename(PLUGINDIR, file, NULL); - if (stat(filename, &st) < 0) { - error("Can't find plugin %s: %s", filename, - strerror(errno)); - g_free(filename); - continue; - } - handle = dlopen(filename, RTLD_NOW); if (handle == NULL) { error("Can't load plugin %s: %s", filename, |