ACK: [PATCH 24/46] hpet: hpet_check: reduce scope of variables
Alex Hung
alex.hung at canonical.com
Tue Jan 20 07:43:06 UTC 2015
On 01/14/2015 03:04 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> cppcheck is picking up some minor style issues which can
> be easily fixed:
>
> [src/hpet/hpet_check/hpet_check.c:40]:
> (style) The scope of the variable 'idx' can be reduced.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/hpet/hpet_check/hpet_check.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/hpet/hpet_check/hpet_check.c b/src/hpet/hpet_check/hpet_check.c
> index 3a985e6..41b57bf 100644
> --- a/src/hpet/hpet_check/hpet_check.c
> +++ b/src/hpet/hpet_check/hpet_check.c
> @@ -37,11 +37,11 @@ static void *hpet_base_v = 0;
> static void hpet_parse_check_base(fwts_framework *fw,
> const char *table, fwts_list_link *item)
> {
> - char *val, *idx;
> + char *val;
>
> if ((val = strstr(fwts_text_list_text(item), "0x")) != NULL) {
> uint64_t address_base;
> - idx = index(val, ',');
> + char *idx = index(val, ',');
> if (idx)
> *idx = '\0';
>
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list