kconfig: qconf: remove wrong ConfigList::firstChild()
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 1 Aug 2020 07:08:50 +0000 (16:08 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 2 Aug 2020 14:09:10 +0000 (23:09 +0900)
This function returns the first child object, but the returned pointer
is not compatible with (ConfigItem *).

Commit cc1c08edccaf ("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 <masahiroy@kernel.org>
scripts/kconfig/qconf.cc
scripts/kconfig/qconf.h

index 762e2ac6679e10b7124a7062f7fee1a7d3b5bb53..23d1cb01a41aef4c0675c2b46b6cda4a4015a129 100644 (file)
@@ -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
index fb9e9729266fc5a14ee9b5f1becc1355f70a6eb4..5eeab4a8bb436f0f7c6392bd8b600e11e8145e46 100644 (file)
@@ -92,10 +92,6 @@ public:
        {
                return this;
        }
-       ConfigItem* firstChild() const
-       {
-               return (ConfigItem *)children().first();
-       }
        void addColumn(colIdx idx)
        {
                showColumn(idx);