From 8f9a01eecea08017f5b1c9685055aeda424051ed Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Mon, 28 Feb 2011 18:40:31 +0000 Subject: [PATCH] 2011-02-28 Michael Snyder * opencl-lang.c (lval_func_check_validity): Rename inner variables. (lval_func_check_synthetic_pointer): Ditto. --- gdb/ChangeLog | 4 +++- gdb/opencl-lang.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d8afa4b..6768c11 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,8 @@ 2011-02-28 Michael Snyder - * opencl-lang.c (lval_func_free_closure): Fix use-after-free. + * opencl-lang.c (lval_func_check_validity): Rename inner variables. + (lval_func_check_synthetic_pointer): Ditto. + (lval_func_free_closure): Fix use-after-free. 2011-02-28 Tom Tromey diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c index 1004f08..bbd95f1 100644 --- a/gdb/opencl-lang.c +++ b/gdb/opencl-lang.c @@ -263,11 +263,11 @@ lval_func_check_validity (const struct value *v, int offset, int length) for (i = start; i < end; i++) { - int startoffset = (i == start) ? startrest : 0; - int length = (i == end) ? endrest : elsize; + int comp_offset = (i == start) ? startrest : 0; + int comp_length = (i == end) ? endrest : elsize; - if (!value_bits_valid (c->val, c->indices[i] * elsize + startoffset, - length)) + if (!value_bits_valid (c->val, c->indices[i] * elsize + comp_offset, + comp_length)) return 0; } @@ -317,12 +317,12 @@ lval_func_check_synthetic_pointer (const struct value *v, for (i = start; i < end; i++) { - int startoffset = (i == start) ? startrest : 0; - int length = (i == end) ? endrest : elsize; + int comp_offset = (i == start) ? startrest : 0; + int comp_length = (i == end) ? endrest : elsize; if (!value_bits_synthetic_pointer (c->val, - c->indices[i] * elsize + startoffset, - length)) + c->indices[i] * elsize + comp_offset, + comp_length)) return 0; } -- 2.7.4