Skip to content

Commit

Permalink
Issue - (#10): The hist_* is not working in CentOS.
Browse files Browse the repository at this point in the history
Remove some old code, missed previously.
  • Loading branch information
ibrarahmad committed Dec 3, 2019
1 parent 344b12a commit 9f1cf36
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pg_stat_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -3429,18 +3429,17 @@ array_get_datum(double arr[])
char tmp[10];
bool first = true;

memset(str, 0, 1024);
/* Need to calculate the actual size, and avoid unnessary memory usage */
for (j = 0; j < 24; j++)
{
if (first)
{
snprintf(str, 1024, "%s %04.1f", str, arr[j]);
snprintf(tmp, 10, "%04.1f", arr[j]);
strcat(str,tmp);
first = false;
continue;
}
sprintf(str, "%s, %04.1f", str, arr[j]);
snprintf(tmp, 10, ", %04.1f", arr[j]);
strcat(str,tmp);
}
Expand Down

0 comments on commit 9f1cf36

Please sign in to comment.