mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-23 01:11:01 +00:00
error: Remove unnecessary local_err variables
This patch simplifies code that uses a local_err variable just to immediately use it for an error_propagate() call. Coccinelle patch used to perform the changes added to scripts/coccinelle/remove_local_err.cocci. Backports commit 6b62d961373e0327f2af8fb77d6d5d6308864180 from qemu
This commit is contained in:
parent
5ae787f895
commit
0f6513ef62
|
@ -1970,7 +1970,7 @@ static void x86_cpu_get_feature_words(struct uc_struct *uc,
|
||||||
{
|
{
|
||||||
uint32_t *array = (uint32_t *)opaque;
|
uint32_t *array = (uint32_t *)opaque;
|
||||||
FeatureWord w;
|
FeatureWord w;
|
||||||
Error *err = NULL;
|
|
||||||
// These all get setup below, so no need to initialise them here.
|
// These all get setup below, so no need to initialise them here.
|
||||||
X86CPUFeatureWordInfo word_infos[FEATURE_WORDS];
|
X86CPUFeatureWordInfo word_infos[FEATURE_WORDS];
|
||||||
X86CPUFeatureWordInfoList list_entries[FEATURE_WORDS];
|
X86CPUFeatureWordInfoList list_entries[FEATURE_WORDS];
|
||||||
|
@ -1991,8 +1991,7 @@ static void x86_cpu_get_feature_words(struct uc_struct *uc,
|
||||||
list = &list_entries[w];
|
list = &list_entries[w];
|
||||||
}
|
}
|
||||||
|
|
||||||
visit_type_X86CPUFeatureWordInfoList(v, "feature-words", &list, &err);
|
visit_type_X86CPUFeatureWordInfoList(v, "feature-words", &list, errp);
|
||||||
error_propagate(errp, err);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert all '_' in a feature string option name to '-', to make feature
|
/* Convert all '_' in a feature string option name to '-', to make feature
|
||||||
|
|
Loading…
Reference in a new issue