Skip to content

Commit

Permalink
Fix one-off bug in metrics. (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
tswhison committed Apr 14, 2020
1 parent c01a5bc commit 36a40c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/xfpga/metrics/metrics_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ fpga_result add_metric_vector(fpga_metric_vector *vector,
fpga_enum_metric->group_name[len] = '\0';

len = strnlen(group_sysfs, SYSFS_PATH_MAX - 1);
memcpy(fpga_enum_metric->group_sysfs, group_sysfs, len + 1);
memcpy(fpga_enum_metric->group_sysfs, group_sysfs, len);
fpga_enum_metric->group_sysfs[len] = '\0';

len = strnlen(metric_name, SYSFS_PATH_MAX - 1);
Expand Down

0 comments on commit 36a40c7

Please sign in to comment.