*p = '\0';
/* point to the beginning of the linked list of plugins for this api */
- pnext = &(gvc->apis[api]);
+ pnext = &gvc->apis[api];
/* keep alpha-sorted and insert new duplicates ahead of old */
while (*pnext) {
*p = '\0';
if (strcmp(pins, pnxt) <= 0)
break;
- pnext = &((*pnext)->next);
+ pnext = &(*pnext)->next;
}
/* keep quality sorted within type and insert new duplicates ahead of old */
break;
if (quality >= (*pnext)->quality)
break;
- pnext = &((*pnext)->next);
+ pnext = &(*pnext)->next;
}
plugin = GNEW(gvplugin_available_t);
pnext = gvc->apis[api];
while (pnext) {
- if ((strcasecmp(typestr, pnext->typestr) == 0)
- && (strcasecmp(name, pnext->package->name) == 0)
- && (pnext->package->path != 0)
- && (strcasecmp(plugin_path, pnext->package->path) == 0)) {
+ if (strcasecmp(typestr, pnext->typestr) == 0
+ && strcasecmp(name, pnext->package->name) == 0
+ && pnext->package->path != 0
+ && strcasecmp(plugin_path, pnext->package->path) == 0) {
pnext->typeptr = typeptr;
return;
}
}
hndl = lt_dlopen(p);
if (!hndl) {
- if ((stat(p, &sb)) == 0) {
+ if (stat(p, &sb) == 0) {
agerr(AGWARN, "Could not load \"%s\" - %s\n", p, "It was found, so perhaps one of its dependents was not. Try ldd.");
}
else {
return NULL;
}
free(sym);
- return (gvplugin_library_t *) (ptr);
+ return (gvplugin_library_t *)ptr;
#else
agerr(AGERR, "dynamic loading not available\n");
return NULL;
if (!reqpkg || strcmp(reqpkg, pnext->package->name) == 0) {
// found with no packagename constraints, or with required matching packagename
- if (dep && (apidep != api)) /* load dependency if needed, continue if can't find */
- if (!(gvplugin_load(gvc, apidep, dep)))
+ if (dep && apidep != api) /* load dependency if needed, continue if can't find */
+ if (!gvplugin_load(gvc, apidep, dep))
continue;
break;
}