diff options
author | Guillem Jover <guillem@debian.org> | 2008-06-30 06:14:25 +0300 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2008-06-30 07:08:34 +0300 |
commit | dca65d1a2389ed2cafca37828fe78de46758d37c (patch) | |
tree | fb3ee2b21c61563e8dfae5787462747dfb4fc2c7 /dselect/basecmds.cc | |
parent | 4e146921a6a304e8478321d27527a4af1db2cfc3 (diff) | |
download | dpkg-dca65d1a2389ed2cafca37828fe78de46758d37c.tar.gz |
dselect: Fix compilation warnings
Surround boolean expressions with parenthesis.
Switch a for with an empty body into a while.
Diffstat (limited to 'dselect/basecmds.cc')
-rw-r--r-- | dselect/basecmds.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dselect/basecmds.cc b/dselect/basecmds.cc index f76bc09dc..7ed3c39fb 100644 --- a/dselect/basecmds.cc +++ b/dselect/basecmds.cc @@ -155,7 +155,6 @@ void baselist::displayerror(const char* str) { void baselist::displayhelp(const struct helpmenuentry *helpmenu, int key) { - const struct helpmenuentry *hme; int maxx, maxy, i, y, x, nextkey; getmaxyx(stdscr,maxy,maxx); @@ -163,7 +162,9 @@ void baselist::displayhelp(const struct helpmenuentry *helpmenu, int key) { clearok(stdscr,TRUE); for (;;) { werase(stdscr); - for (hme= helpmenu; hme->key && hme->key != key; hme++); + const struct helpmenuentry *hme = helpmenu; + while (hme->key && hme->key != key) + hme++; if (hme->key) { attrset(helpscreen_attr); mvaddstr(1,0, gettext(hme->msg->text)); |