openbsd-ports/sysutils/bubblemon/patches/patch-src_bubblemon_c
marcm 52c81dfbba Update to Gnome 2 version.
Implicitly oked by MAINTAINER ("you can mark it BROKEN too")
2003-09-23 21:24:52 +00:00

31 lines
1.2 KiB
Plaintext

$OpenBSD: patch-src_bubblemon_c,v 1.4 2003/09/23 21:24:52 marcm Exp $
--- src/bubblemon.c.orig 2002-11-21 23:13:45.000000000 -0800
+++ src/bubblemon.c 2003-09-23 11:36:29.000000000 -0700
@@ -154,7 +154,7 @@ const char *bubblemon_getTooltip(void)
if (sysload.swapSize > 0)
{
usage2string(swapstring, sysload.swapUsed, sysload.swapSize);
- snprintf(loadstring, 90,
+ snprintf(loadstring, sizeof loadstring,
_("\nSwap used: %s"),
swapstring);
strcat(tooltipstring, loadstring);
@@ -162,7 +162,7 @@ const char *bubblemon_getTooltip(void)
if (sysload.nCpus == 1)
{
- snprintf(loadstring, 45,
+ snprintf(loadstring, sizeof loadstring,
_("\nCPU load: %d%%"),
bubblemon_getCpuLoadPercentage(0));
strcat(tooltipstring, loadstring);
@@ -173,7 +173,7 @@ const char *bubblemon_getTooltip(void)
cpu_number < sysload.nCpus;
cpu_number++)
{
- snprintf(loadstring, 45,
+ snprintf(loadstring, sizeof loadstring,
_("\nCPU #%d load: %d%%"),
cpu_number,
bubblemon_getCpuLoadPercentage(cpu_number));