fixed LinkTable_uninitialised_fill() status output

This commit is contained in:
Fufu Fang 2021-08-29 10:58:11 +01:00
parent 7c83da7e32
commit 05ebf76094
No known key found for this signature in database
GPG Key ID: 0F6BB5EF6F8BB729
1 changed files with 3 additions and 7 deletions

View File

@ -48,11 +48,7 @@ LinkTable *LinkSystem_init(const char *raw_url)
/* This is where the '/' should be */ /* This is where the '/' should be */
ROOT_LINK_OFFSET = strnlen(url, MAX_PATH_LEN) + 1; ROOT_LINK_OFFSET = strnlen(url, MAX_PATH_LEN) + 1;
/* --------------------- Enable cache system -------------------- / /* --------------------- Enable cache system -------------------- */
*
* Note that cache system is enabled automatically if sonic mode is
* enabled
*/
if (CONFIG.cache_enabled) { if (CONFIG.cache_enabled) {
if (CONFIG.cache_dir) { if (CONFIG.cache_dir) {
CacheSystem_init(CONFIG.cache_dir, 0); CacheSystem_init(CONFIG.cache_dir, 0);
@ -313,12 +309,12 @@ static void LinkTable_uninitialised_fill(LinkTable *linktbl)
erase_string(stderr, STATUS_LEN, s); erase_string(stderr, STATUS_LEN, s);
} }
snprintf(s, STATUS_LEN, "%d / %d", n-i, n); snprintf(s, STATUS_LEN, "%d / %d", n-i, n);
lprintf(debug, "%s", s); fprintf(stderr, "%s", s);
j++; j++;
} }
} while (u); } while (u);
erase_string(stderr, STATUS_LEN, s); erase_string(stderr, STATUS_LEN, s);
lprintf(debug, "Done!\n"); fprintf(stderr, "Done!\n");
} }
static void LinkTable_fill(LinkTable *linktbl) static void LinkTable_fill(LinkTable *linktbl)