more sizeof (bug 14401, bug 14403)

This commit is contained in:
rim
2018-05-26 23:21:21 +02:00
committed by Landry Breuil
parent 5e0fb6f4bc
commit c725dee6a9

View File

@@ -566,12 +566,12 @@ xtm_process_window_set_system_info (XtmProcessWindow *window, guint num_processe
g_object_set (window->statusbar, "num-processes", num_processes, "cpu", cpu, "memory", memory_str, "swap", swap_str, NULL);
xtm_process_monitor_add_peak (XTM_PROCESS_MONITOR (window->cpu_monitor), cpu / 100.0);
g_snprintf (value, 4, "%.0f", cpu);
g_snprintf (text, 100, _("CPU: %s%%"), value);
g_snprintf (value, sizeof(value), "%.0f", cpu);
g_snprintf (text, sizeof(text), _("CPU: %s%%"), value);
gtk_widget_set_tooltip_text (window->cpu_monitor, text);
xtm_process_monitor_add_peak (XTM_PROCESS_MONITOR (window->mem_monitor), memory / 100.0);
g_snprintf (text, 100, _("Memory: %s"), memory_str);
g_snprintf (text, sizeof(text), _("Memory: %s"), memory_str);
gtk_widget_set_tooltip_text (window->mem_monitor, text);
}