summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/tex-glyph.c
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2017-12-09 14:00:07 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2017-12-09 14:00:07 +0000
commitfb0976eba4285e6fb42abd23bbe2e7a8fbf5563c (patch)
treef79f4a347a4cd76dc3ecd0b1d05306bb32bd9a5d /Build/source/texk/kpathsea/tex-glyph.c
parent227fa7bafe9f9c02eeaa6baef341edcae3b17060 (diff)
tex-glyph.c: avoid compiler warning
git-svn-id: svn://tug.org/texlive/trunk@46024 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/tex-glyph.c')
-rw-r--r--Build/source/texk/kpathsea/tex-glyph.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/tex-glyph.c b/Build/source/texk/kpathsea/tex-glyph.c
index 79b27f606f5..c98a17edf47 100644
--- a/Build/source/texk/kpathsea/tex-glyph.c
+++ b/Build/source/texk/kpathsea/tex-glyph.c
@@ -1,6 +1,6 @@
/* tex-glyph.c: search for GF/PK files.
- Copyright 1993, 1994, 1995, 1996, 2008, 2009, 2011 Karl Berry.
+ Copyright 1993, 1994, 1995, 1996, 2008, 2009, 2011, 2017 Karl Berry.
Copyright 1997, 1998, 1999, 2005 Olaf Weber.
This library is free software; you can redistribute it and/or
@@ -201,7 +201,10 @@ try_fallback_resolutions (kpathsea kpse,
/* First find the fallback size closest to DPI, even including DPI. */
for (s = 0; kpse->fallback_resolutions[s] != 0; s++)
{
- unsigned this_diff = abs (kpse->fallback_resolutions[s] - dpi);
+ unsigned this_diff =
+ kpse->fallback_resolutions[s] > dpi
+ ? kpse->fallback_resolutions[s] - dpi
+ : dpi - kpse->fallback_resolutions[s];
if (this_diff < closest_diff)
{
closest_diff = this_diff;