Module Name: src Committed By: joerg Date: Thu Feb 27 18:09:18 UTC 2014
Modified Files: src/gnu/dist/texinfo/info: session.c Log Message: Cast strlen of constant down to avoid argument widening. Change an abs to labs based on the arguments. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/gnu/dist/texinfo/info/session.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/gnu/dist/texinfo/info/session.c diff -u src/gnu/dist/texinfo/info/session.c:1.5 src/gnu/dist/texinfo/info/session.c:1.6 --- src/gnu/dist/texinfo/info/session.c:1.5 Tue Sep 2 08:41:51 2008 +++ src/gnu/dist/texinfo/info/session.c Thu Feb 27 18:09:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: session.c,v 1.5 2008/09/02 08:41:51 christos Exp $ */ +/* $NetBSD: session.c,v 1.6 2014/02/27 18:09:18 joerg Exp $ */ /* session.c -- user windowing interface to Info. Id: session.c,v 1.16 2004/12/14 00:15:36 karl Exp @@ -2020,7 +2020,7 @@ nearest_xref (REFERENCE **xref_list, lon /* See how far POS is from this xref. Take into account the `*Note' that begins the xref, since as far as the user is concerned, that's where it starts. */ - delta = MIN (labs (pos - (xref->start - strlen (INFO_XREF_LABEL))), + delta = MIN (labs (pos - (xref->start - (long)strlen (INFO_XREF_LABEL))), labs (pos - xref->end)); /* It's the <= instead of < that makes us choose the forward xref @@ -2247,7 +2247,7 @@ info_menu_or_ref_item (WINDOW *window, i { /* ref->end is more accurate estimate of position for menus than ref->start. Go figure. */ - int dist = abs (window->point - ref->end); + int dist = labs (window->point - ref->end); if (dist < min_dist) {