X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fmainwindow.cpp;h=ba232e25d0cb5afae12d5bb3f80a09f6b2fe3714;hp=dc5f981f7b3a5207ab0bc777e1656e292d12784b;hb=6e3f046e779b939efebdfa4d9e68fe28d9beee59;hpb=67fe5e9c02e4e9cfe94d465a0a5e5b598129e4e3 diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index dc5f981f..ba232e25 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -305,7 +305,8 @@ void MainWindow::setup_add_decoders(QMenu *parent) { GSList *l = g_slist_sort(g_slist_copy( (GSList*)srd_decoder_list()), decoder_name_cmp); - while ((l = l->next)) { + for(; l; l = l->next) + { QAction *const action = parent->addAction(QString( ((srd_decoder*)l->data)->name)); action->setData(qVariantFromValue(l->data));