xfpga: fix issue identified by checkers
@@ -319,7 +319,7 @@ fpga_result dfl_enum_max10_metrics_info(struct _fpga_handle *_handle,
memcpy(metrics_sysfs_path, pglob.gl_pathv[i], len);
metrics_sysfs_path[len] = '\0';
- if (strlen(metrics_sysfs_path) + sizeof(DFL_VALUE) > SYSFS_PATH_MAX) {
+ if (strlen(metrics_sysfs_path) + sizeof(DFL_VALUE) >= SYSFS_PATH_MAX) {
OPAE_ERR("Invalid sensor sysfs path length");
result = FPGA_EXCEPTION;
goto out;
