diff options
Diffstat (limited to 'xkbpath.c')
-rw-r--r-- | xkbpath.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -178,11 +178,9 @@ XkbAddDefaultDirectoriesToPath(void) void XkbClearIncludePath(void) { - int i; - if (szPath > 0) { - for (i = 0; i < nPathEntries; i++) + for (int i = 0; i < nPathEntries; i++) { if (includePath[i] != NULL) { @@ -376,17 +374,16 @@ XkbFindFileInCache(char *name, unsigned type, char **pathRtrn) FILE * XkbFindFileInPath(char *name, unsigned type, char **pathRtrn) { - int i; FILE *file = NULL; - int nameLen, typeLen, pathLen; + int nameLen, typeLen; char buf[PATH_MAX], *typeDir; typeDir = XkbDirectoryForInclude(type); nameLen = strlen(name); typeLen = strlen(typeDir); - for (i = 0; i < nPathEntries; i++) + for (int i = 0; i < nPathEntries; i++) { - pathLen = strlen(includePath[i]); + int pathLen = strlen(includePath[i]); if (typeLen < 1) continue; |