diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2012-11-03 10:45:01 +0100 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2012-11-03 10:45:01 +0100 |
commit | 6f6a8c2f9d921185a1403be27ec013d9f48a8cbf (patch) | |
tree | 7d66e1e4cd32db1f2b9bf9d6800ba426bbdd7e3a | |
parent | e02ef42c0725935fce74415cc48fa5f50ec6d023 (diff) |
ps: Fix comparison between signed and unsigned compile warning
https://bugs.freedesktop.org/show_bug.cgi?id=56476
-rw-r--r-- | libspectre/ps.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libspectre/ps.c b/libspectre/ps.c index 0130fb4..fb84d80 100644 --- a/libspectre/ps.c +++ b/libspectre/ps.c @@ -1190,8 +1190,9 @@ continuepage: section_len += line_len; } else if (doc->doseps) { /* No EOF, make sure endtrailer <= ps_end */ - if (position > doc->doseps->ps_begin + doc->doseps->ps_length) { - position = doc->doseps->ps_begin + doc->doseps->ps_length; + long ps_end = doc->doseps->ps_begin + doc->doseps->ps_length; + if (position > ps_end) { + position = ps_end; section_len = position - doc->begintrailer; line_len = 0; } |