Skip to content

Commit

Permalink
kconfig: qconf: remove wrong ConfigList::firstChild()
Browse files Browse the repository at this point in the history
This function returns the first child object, but the returned pointer
is not compatible with (ConfigItem *).

Commit cc1c08e ("kconfig: qconf: don't show goback button on
splitMode") uncovered this issue because using the pointer from this
function would make qconf crash. (https://lkml.org/lkml/2020/7/18/411)

This function does not work. Remove.

Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
masahir0y committed Aug 2, 2020
1 parent 4b20e10 commit ccf56e5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/kconfig/qconf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ void ConfigList::updateList(ConfigItem* item)
}
if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) &&
rootEntry->sym && rootEntry->prompt) {
item = last ? last->nextSibling() : firstChild();
item = last ? last->nextSibling() : nullptr;
if (!item)
item = new ConfigItem(this, last, rootEntry, true);
else
Expand Down
4 changes: 0 additions & 4 deletions scripts/kconfig/qconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ public slots:
{
return this;
}
ConfigItem* firstChild() const
{
return (ConfigItem *)children().first();
}
void addColumn(colIdx idx)
{
showColumn(idx);
Expand Down

0 comments on commit ccf56e5

Please sign in to comment.