aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-04-02 13:50:22 +0100
committerMatt Fleming <matt.fleming@intel.com>2012-04-17 10:58:33 +0100
commita51c83f273e7204d9ee8521e1f7e1d098e5d3382 (patch)
treec7bb9baedc432632ef1e76b26187fdd669197eea
parentf1be23e2251520c35f8581f4612f2356ef6de0ee (diff)
downloadsyslinux-a51c83f273e7204d9ee8521e1f7e1d098e5d3382.tar.gz
syslinux-a51c83f273e7204d9ee8521e1f7e1d098e5d3382.tar.xz
syslinux-a51c83f273e7204d9ee8521e1f7e1d098e5d3382.zip
ldlinux: Fix check for last command line entry
The expression that checks to see when we've reached the end of the command line entries is incorrect, probably because the list macros weren't used. Use list_is_last() to make the expression correct and self-documenting. This bug was highlighted by the following compiler warning, cli.c: In function ‘cmd_reverse_search’: cli.c:102:20: warning: comparison of distinct pointer types lacks a cast Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r--com32/elflink/ldlinux/cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c
index fb041aeb..6d74109c 100644
--- a/com32/elflink/ldlinux/cli.c
+++ b/com32/elflink/ldlinux/cli.c
@@ -99,7 +99,7 @@ static const char * cmd_reverse_search(int *cursor)
break;
}
- while (last_found != &cli_history_head) {
+ while (!list_is_last(&last_found->list, &cli_history_head)) {
p = strstr(last_found->command, buf);
if (p)
break;