We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 447b2ca + 266b7f8 commit 1f3811cCopy full SHA for 1f3811c
scripts/kconfig/confdata.c
@@ -669,14 +669,16 @@ static char *conf_value_to_yaml(struct symbol *sym, const char *val)
669
yaml_value = strdup(val);
670
break;
671
case S_HEX:
672
- asprintf(&yaml_value, "0x%s", val);
673
- break;
674
- case S_STRING:
675
- /* Wrap strings in quotes */
676
- asprintf(&yaml_value, "\"%s\"", val);
677
678
- case S_BOOLEAN:
679
- case S_TRISTATE:
+ if (asprintf(&yaml_value, "0x%s", val) < 0)
+ return NULL;
+ break;
+ case S_STRING:
+ /* Wrap strings in quotes */
+ if (asprintf(&yaml_value, "\"%s\"", val) < 0)
680
+ case S_BOOLEAN:
681
+ case S_TRISTATE:
682
if (strcmp(val, "y") == 0)
683
yaml_value = strdup("True");
684
else if (strcmp(val, "n") == 0)
0 commit comments