summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2654e60)
raw | patch | inline | side by side (parent: 2654e60)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 9 May 2011 06:17:03 +0000 (08:17 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 9 May 2011 06:17:03 +0000 (08:17 +0200) |
Usually, OPT_OK != OK, so we'd usually treat success as an error, leading e.g.
to errors like "Unable to parse '42' as a line number".
Reported by Christian Ohm in Debian bug #626124.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
to errors like "Unable to parse '42' as a line number".
Reported by Christian Ohm in Debian bug #626124.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
tig.c | patch | blob | history |
index 2baf56cdc6c5bd30bc28da30c542020661b298a0..2767fde330ff077902a2d8e06aee3563bd52b8b6 100644 (file)
--- a/tig.c
+++ b/tig.c
if (map_enum(color, color_map, name))
return TRUE;
if (!prefixcmp(name, "color"))
- return parse_int(color, name + 5, 0, 255) == OK;
+ return parse_int(color, name + 5, 0, 255) == OPT_OK;
return FALSE;
}
if (cmd && isdigit(*cmd)) {
int lineno = view->lineno + 1;
- if (parse_int(&lineno, cmd, 1, view->lines + 1) == OK) {
+ if (parse_int(&lineno, cmd, 1, view->lines + 1) == OPT_OK) {
select_view_line(view, lineno - 1);
report("");
} else {