1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

wrlib: load.c clean coding style

just some code cleaning stuff.
This commit is contained in:
David Maciejak
2014-06-11 12:26:55 +07:00
committed by Carlos R. Mafra
parent 1bd9074464
commit cb5076794a

View File

@@ -108,16 +108,15 @@ static void init_cache(void)
char *tmp;
tmp = getenv("RIMAGE_CACHE");
if (!tmp || sscanf(tmp, "%i", &RImageCacheSize) != 1) {
if (!tmp || sscanf(tmp, "%i", &RImageCacheSize) != 1)
RImageCacheSize = IMAGE_CACHE_SIZE;
}
if (RImageCacheSize < 0)
RImageCacheSize = 0;
tmp = getenv("RIMAGE_CACHE_SIZE");
if (!tmp || sscanf(tmp, "%i", &RImageCacheMaxImage) != 1) {
if (!tmp || sscanf(tmp, "%i", &RImageCacheMaxImage) != 1)
RImageCacheMaxImage = IMAGE_CACHE_MAX_IMAGE;
}
if (RImageCacheSize > 0) {
RImageCache = malloc(sizeof(RCachedImage) * RImageCacheSize);
@@ -154,9 +153,8 @@ RImage *RLoadImage(RContext * context, const char *file, int index)
assert(file != NULL);
if (RImageCacheSize < 0) {
if (RImageCacheSize < 0)
init_cache();
}
if (RImageCacheSize > 0) {