qv4l2: fix coverity defect
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 11 Jul 2014 22:20:19 +0000 (00:20 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Fri, 11 Jul 2014 22:20:19 +0000 (00:20 +0200)
commite621e2d0ef8a8f907449a34cd5eaedc7ac27ba67
tree17514fb65eb07ede4b406b9837183d7c1a12b26b
parent387a6bf8f0ac3597b3c0cc7ef6c4b464679d570f
qv4l2: fix coverity defect

** CID 1225222:  Array compared against 0  (NO_EFFECT)
/utils/qv4l2/ctrl-tab.cpp: 150 in ApplicationWindow::addTabs(int *)()

*** CID 1225222:  Array compared against 0  (NO_EFFECT)
/utils/qv4l2/ctrl-tab.cpp: 150 in ApplicationWindow::addTabs(int *)()
144      QVBoxLayout *vbox = new QVBoxLayout(t);
145      QWidget *w = new QWidget(t);
146
147      vbox->addWidget(w);
148
149      QGridLayout *grid = new QGridLayout(w);
>>>     CID 1225222:  Array compared against 0  (NO_EFFECT)
>>>     Comparing an array to null is not useful: "(char *)qctrl.name".
150      if((char *)qctrl.name) {
151      QLabel *title_tab = new QLabel((char *)qctrl.name, parentWidget());
152      QFont f = title_tab->font();
153      f.setBold(true);
154      title_tab->setFont(f);
155      grid->addWidget(title_tab, m_row, m_col, 1, m_cols, Qt::AlignLeft);

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/qv4l2/ctrl-tab.cpp