11b5ac9ae4
It does not work any better than the current in-tree version though :-/ Probably due to our outdated and broken libgtop2.
31 lines
1.2 KiB
Plaintext
31 lines
1.2 KiB
Plaintext
$OpenBSD: patch-src_bubblemon_c,v 1.6 2009/10/15 11:50:28 ajacoutot Exp $
|
|
--- src/bubblemon.c.orig Mon Sep 14 21:48:46 2009
|
|
+++ src/bubblemon.c Thu Oct 15 13:23:54 2009
|
|
@@ -191,7 +191,7 @@ const char *bubblemon_getTooltip(bubblemon_t *bubblemo
|
|
usage2string(swapstring,
|
|
bubblemon->sysload.swapUsed,
|
|
bubblemon->sysload.swapSize);
|
|
- snprintf(loadstring, 45,
|
|
+ snprintf(loadstring, sizeof loadstring,
|
|
_("\nSwap used: %s"),
|
|
swapstring);
|
|
strcat(bubblemon->tooltipstring, loadstring);
|
|
@@ -204,7 +204,7 @@ const char *bubblemon_getTooltip(bubblemon_t *bubblemo
|
|
|
|
if (bubblemon->sysload.nCpus == 1)
|
|
{
|
|
- snprintf(loadstring, 45,
|
|
+ snprintf(loadstring, sizeof loadstring,
|
|
_("\nCPU load: %d%%"),
|
|
bubblemon_getCpuLoadPercentage(bubblemon, 0));
|
|
strcat(bubblemon->tooltipstring, loadstring);
|
|
@@ -215,7 +215,7 @@ const char *bubblemon_getTooltip(bubblemon_t *bubblemo
|
|
cpu_number < bubblemon->sysload.nCpus;
|
|
cpu_number++)
|
|
{
|
|
- snprintf(loadstring, 45,
|
|
+ snprintf(loadstring, sizeof loadstring,
|
|
_("\nCPU #%d load: %d%%"),
|
|
cpu_number,
|
|
bubblemon_getCpuLoadPercentage(bubblemon, cpu_number));
|