[pango] Bug 707131 - removing useless test.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] Bug 707131 - removing useless test.
- Date: Wed, 4 Sep 2013 01:10:13 +0000 (UTC)
commit 285be5bd7ee3ce87bb027b405be674d6f91995d1
Author: Jehan <jehan girinstud io>
Date: Wed Sep 4 13:04:47 2013 +1200
Bug 707131 - removing useless test.
Since pango_scan_int() would return FALSE if the scanned value was over
INT_MAX; and the reference out value's type is an int, (n > INT_MAX)
test is unecessary.
If pango_scan_int() behavior was to be changed to accept long
int, an explicit test should be added (or the PangoAttrSize
type updated to handle long int too).
pango/pango-markup.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/pango/pango-markup.c b/pango/pango-markup.c
index 2b2c304..c96c29e 100644
--- a/pango/pango-markup.c
+++ b/pango/pango-markup.c
@@ -1190,7 +1190,7 @@ span_parse_func (MarkupData *md G_GNUC_UNUSED,
const char *end;
gint n;
- if ((end = size, !pango_scan_int (&end, &n)) || *end != '\0' || n < 0 || n > INT_MAX)
+ if ((end = size, !pango_scan_int (&end, &n)) || *end != '\0' || n < 0)
{
g_set_error (error,
G_MARKUP_ERROR,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]