ACK: [PATCH] opal: mem_info: reduce scope of some variables
Alex Hung
alex.hung at canonical.com
Wed Jan 25 07:21:02 UTC 2017
On 2017-01-24 08:27 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> clean up some cppcheck style warnings by reducing scope of some
> variables.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/opal/mem_info.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/opal/mem_info.c b/src/opal/mem_info.c
> index 6cc0fd9..2b20f80 100644
> --- a/src/opal/mem_info.c
> +++ b/src/opal/mem_info.c
> @@ -32,12 +32,14 @@ static int get_dimm_property(fwts_framework *fw,
> bool hex,
> char *property)
> {
> - int node, prop_len, failures = 0;
> - const char *prop_buf;
> + int failures = 0;
> char *prop_string = strstr(my_path, "/memory-buffer");
>
> if (prop_string) {
> - node = fdt_path_offset(fw->fdt, prop_string);
> + const char *prop_buf;
> + int prop_len;
> + int node = fdt_path_offset(fw->fdt, prop_string);
> +
> if (node >= 0) {
> prop_buf = fdt_getprop(fw->fdt, node,
> property,
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list