1
0
mirror of https://github.com/Cloudef/bemenu synced 2024-11-23 17:32:11 +01:00

Don't use the enumerator variable.

This commit is contained in:
Jari Vetoniemi 2014-04-15 20:14:42 +03:00
parent f77ae857b1
commit 88590ddcfe

@ -403,15 +403,15 @@ static void _bmDrawCursesResizeHandler(int sig)
int _bmDrawCursesInit(struct _bmRenderApi *api)
{
memset(&curses, 0, sizeof(curses));
const char *lib = NULL, *func = NULL;
unsigned int i;
for (i = 0; DL_PATH[i] && !curses.handle; ++i)
curses.handle = dlopen(DL_PATH[i], RTLD_LAZY);
curses.handle = dlopen((lib = DL_PATH[i]), RTLD_LAZY);
if (!curses.handle)
return 0;
char *func = NULL;
#define bmLoadFunction(x) (curses.x = dlsym(curses.handle, (func = #x)))
if (!bmLoadFunction(initscr))
@ -473,7 +473,7 @@ int _bmDrawCursesInit(struct _bmRenderApi *api)
return 1;
function_pointer_exception:
fprintf(stderr, "-!- Could not load function '%s' from '%s'\n", func, DL_PATH[i]);
fprintf(stderr, "-!- Could not load function '%s' from '%s'\n", func, lib);
_bmDrawCursesFree();
return 0;
}