From: David Lawrence Ramsey Date: Fri, 23 Dec 2005 03:15:12 +0000 (+0000) Subject: in parse_line_column(), simplify parsing of the column number X-Git-Tag: v1.3.10~3 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e57bd4993ecd870c067bd7f8ab97d19cf4da6e99;p=nano.git in parse_line_column(), simplify parsing of the column number git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3243 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 86202cae..6976a025 100644 --- a/ChangeLog +++ b/ChangeLog @@ -247,6 +247,8 @@ CVS code - the text of the spell-checked file into its own function, replace_buffer(). (DLR) - utils.c: + parse_line_column() + - Simplify parsing of the column number. (DLR) ngetdelim() - Do sanity checks in an assert instead of checking them manually and returning -1 if they fail. (DLR) diff --git a/src/utils.c b/src/utils.c index 1f5813d7..04337129 100644 --- a/src/utils.c +++ b/src/utils.c @@ -94,7 +94,7 @@ bool parse_line_column(const char *str, ssize_t *line, ssize_t *column) comma = strchr(str, ','); if (comma != NULL && column != NULL) { - if (!parse_num(str + (comma - str + 1), column)) + if (!parse_num(comma + 1, column)) retval = FALSE; }