groff/0010-Fix-array-comparison-warning-by-comparing-elements-i.patch
Lukas Javorsky 110a111914 Fixing SAST reports
Resolves: RHEL-45003
2024-08-21 11:57:10 +00:00

27 lines
824 B
Diff

From d9e08e8d8687c32bc6f079fed91e708374aadde8 Mon Sep 17 00:00:00 2001
From: Lukas Javorsky <ljavorsk@redhat.com>
Date: Mon, 12 Aug 2024 14:38:00 +0200
Subject: [PATCH 4/7] Fix array comparison warning by comparing elements
individually
---
src/preproc/refer/ref.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/preproc/refer/ref.cpp b/src/preproc/refer/ref.cpp
index 5f6d5c63a..65b7edaf3 100644
--- a/src/preproc/refer/ref.cpp
+++ b/src/preproc/refer/ref.cpp
@@ -536,7 +536,7 @@ int same_reference(const reference &r1, const reference &r2)
return 0;
int i = 0;
for (i = 0; i < 256; i++)
- if (r1.field_index != r2.field_index)
+ if (r1.field_index[i] != r2.field_index[i])
return 0;
for (i = 0; i < r1.nfields; i++)
if (r1.field[i] != r2.field[i])
--
2.44.0