Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for > 16 CPUs

  • Loading branch information...
commit 7be0a9eecf9b452517d6cfb64220959a01b6fbca 1 parent cb65f49
@stovenator authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/check_snmp_load.c
View
4 src/check_snmp_load.c
@@ -407,7 +407,7 @@ checkLoad (netsnmp_session * ss)
}
else if ((cpunbr % 10) == 0)
{
- load = realloc (load, cpunbr + 10 * sizeof (int));
+ load = realloc (load, (cpunbr + 10) * sizeof (int));

Oups, well spotted ... I wrote thoses plugins back in 2006 and you are the first to notice this bug, many thanks !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
}
load[cpunbr++] = (*(vars->val).integer);
@@ -511,7 +511,7 @@ check_and_print (int cpunbr)
average += load[count];
if (verbose)
{
- printf ("Cpu n°%d load=%d%% \n", count, load[count]);
+ printf ("Cpu n%d load=%d%% \n", count, load[count]);
}
}
average /= cpunbr;
@vincentg

Oups, well spotted ... I wrote thoses plugins back in 2006 and you are the first to notice this bug, many thanks !!!

Please sign in to comment.
Something went wrong with that request. Please try again.