rc-plubin.c: remove references to PATH_MAX
This commit is contained in:
parent
8e02406d8f
commit
3c031ca978
@ -68,7 +68,7 @@ rc_plugin_load(void)
|
|||||||
DIR *dp;
|
DIR *dp;
|
||||||
struct dirent *d;
|
struct dirent *d;
|
||||||
PLUGIN *plugin;
|
PLUGIN *plugin;
|
||||||
char file[PATH_MAX];
|
char *file = NULL;
|
||||||
void *h;
|
void *h;
|
||||||
int (*fptr)(RC_HOOK, const char *);
|
int (*fptr)(RC_HOOK, const char *);
|
||||||
|
|
||||||
@ -85,8 +85,9 @@ rc_plugin_load(void)
|
|||||||
if (d->d_name[0] == '.')
|
if (d->d_name[0] == '.')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
snprintf(file, sizeof(file), RC_PLUGINDIR "/%s", d->d_name);
|
xasprintf(&file, RC_PLUGINDIR "/%s", d->d_name);
|
||||||
h = dlopen(file, RTLD_LAZY);
|
h = dlopen(file, RTLD_LAZY);
|
||||||
|
free(file);
|
||||||
if (h == NULL) {
|
if (h == NULL) {
|
||||||
eerror("dlopen: %s", dlerror());
|
eerror("dlopen: %s", dlerror());
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user