tools/libxc: Pre-cleanup for xc_cpuid_{set,apply_policy}()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 10 Sep 2019 15:59:20 +0000 (16:59 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 26 Sep 2019 12:40:18 +0000 (13:40 +0100)
commit53b4a87a4c32507d9db2d35c77bafb32fc3e0900
treef234657616faccb4e51ab9954b68d7d22aaff9cd
parent14ba07e6f8164f8fe7a9797996df5079ac61f4ac
tools/libxc: Pre-cleanup for xc_cpuid_{set,apply_policy}()

This patch is broken out just to simplify the following two.

For xc_cpuid_set(), document how the 's' and 'k' options works because it is
quite subtle.  Replace a memset() with a for loop of 4 explicit NULL
assigments.  This mirrors the free()'s in the fail path.

For xc_cpuid_apply_policy(), const-ify the featureset pointer.  It isn't
written to, and was never intended to be mutable.

Drop three pieces of trailing whitespace.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
tools/libxc/include/xenctrl.h
tools/libxc/xc_cpuid_x86.c