Skip to content
Commit dfaf20af authored by Andrew Jones's avatar Andrew Jones Committed by Anup Patel
Browse files

KVM: arm64: selftests: Replace str_with_index with strdup_printf



The original author of aarch64/get-reg-list.c (me) was wearing
tunnel vision goggles when implementing str_with_index(). There's
no reason to have such a special case string function. Instead,
take inspiration from glib and implement strdup_printf. The
implementation builds on vasprintf() which requires _GNU_SOURCE,
but we require _GNU_SOURCE in most files already.

Signed-off-by: default avatarAndrew Jones <ajones@ventanamicro.com>
Signed-off-by: default avatarHaibo Xu <haibo1.xu@intel.com>
Signed-off-by: default avatarAnup Patel <anup@brainfault.org>
parent 630b4cee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment