]> xenbits.xensource.com Git - xen.git/commit
xen/common: address MISRA C:2012 Rule 5.3
authorNicola Vetrini <nicola.vetrini@bugseng.com>
Wed, 2 Aug 2023 08:52:17 +0000 (10:52 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 2 Aug 2023 08:52:17 +0000 (10:52 +0200)
commit8d75d8069b8760d1a8d241f3581a1a1569b9aacf
tree6a39b65b12677e3ccf4d17c615037ed7c5944e5d
parente35944f37b4d98a81c832f0c4c3ed03b304af6d2
xen/common: address MISRA C:2012 Rule 5.3

The following strategies are adopted to deal with violations
of MISRA C:2012 Rule 5.3:
"An identifier declared in an inner scope shall not hide an
identifier declared in an outer scope".

- s/nodes/numa_nodes/ for the file-scope variable in 'common/numa.c';
- move the variable 'struct compat_remove_from_physmap cmp' inside
  the outer union variable 'cmp' to avoid shadowing it.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/common/compat/memory.c
xen/common/numa.c