aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-11-24 10:47:27 +0000
committerYao Qi <yao.qi@linaro.org>2017-11-24 10:47:27 +0000
commit98ead37e9735438986934f9f1f35f020a093fe07 (patch)
treeced7a341a4e4be5149213f3c80bc9890fca38518 /gdb/value.c
parent62ad7ce71b243df3e8d7d4f8b8560a7316233a9e (diff)
downloadgdb-98ead37e9735438986934f9f1f35f020a093fe07.zip
gdb-98ead37e9735438986934f9f1f35f020a093fe07.tar.gz
gdb-98ead37e9735438986934f9f1f35f020a093fe07.tar.bz2
Change value_contents_eq return bool
This patch changes value_contents_eq return type from int to bool. gdb: 2017-11-24 Yao Qi <yao.qi@linaro.org> * mi/mi-main.c (register_changed_p): Update. * value.c (value_contents_bits_eq): Change return type. (value_contents_eq): Likewise. * value.h: Update comments.
Diffstat (limited to 'gdb/value.c')
-rw-r--r--gdb/value.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/value.c b/gdb/value.c
index 1d1e619..3e0ca25 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -808,7 +808,7 @@ find_first_range_overlap_and_match (struct ranges_and_idx *rp1,
with LENGTH bits of VAL2's contents starting at OFFSET2 bits.
Return true if the available bits match. */
-static int
+static bool
value_contents_bits_eq (const struct value *val1, int offset1,
const struct value *val2, int offset2,
int length)
@@ -847,7 +847,7 @@ value_contents_bits_eq (const struct value *val1, int offset1,
if (!find_first_range_overlap_and_match (&rp1[i], &rp2[i],
offset1, offset2, length,
&l_tmp, &h_tmp))
- return 0;
+ return false;
/* We're interested in the lowest/first range found. */
if (i == 0 || l_tmp < l)
@@ -860,17 +860,17 @@ value_contents_bits_eq (const struct value *val1, int offset1,
/* Compare the available/valid contents. */
if (memcmp_with_bit_offsets (val1->contents, offset1,
val2->contents, offset2, l) != 0)
- return 0;
+ return false;
length -= h;
offset1 += h;
offset2 += h;
}
- return 1;
+ return true;
}
-int
+bool
value_contents_eq (const struct value *val1, LONGEST offset1,
const struct value *val2, LONGEST offset2,
LONGEST length)