Skip to content

Commit

Permalink
fm-file-info.c: Use correct printf format in fm_log_memory_usage_for_…
Browse files Browse the repository at this point in the history
…file_info()
  • Loading branch information
wandrien committed Nov 17, 2023
1 parent 8370746 commit 37a5cdc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/base/fm-file-info.c
Expand Up @@ -254,8 +254,10 @@ int file_info_total;
void fm_log_memory_usage_for_file_info(void)
{
int total = g_atomic_int_get(&file_info_total);
g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "memory usage: FmFileInfo: %d bytes * %d items = %lld KiB",
sizeof(FmFileInfo), total, sizeof(FmFileInfo) * (long long) total / 1024);
long long struct_size = sizeof(FmFileInfo);
long long total_kb = struct_size * (long long) total / 1024;
g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "memory usage: FmFileInfo: %lld bytes * %d items = %lld KiB",
struct_size, total, total_kb);
}

/*****************************************************************************/
Expand Down

0 comments on commit 37a5cdc

Please sign in to comment.