]> granicus.if.org Git - graphviz/commit
fix overflow check in sparse
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 23 Jan 2021 23:05:07 +0000 (15:05 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 30 Jan 2021 18:24:57 +0000 (10:24 -0800)
commit0a990630e5e1637d958d9d9a6a0ee0998fff7753
tree6ce74726c8b0b073800bc2fbb0af75cb929e61bd
parent24ff810ab669287952c8fff7faf65049141ea49c
fix overflow check in sparse

Switching to C99 compilation exposes the following compiler warning:

  general.c:364:21: warning: logical ‘or’ of collectively exhaustive tests is always true [-Wlogical-op]
     if (val > INT_MAX || val < INT_MIN) return 0;
                       ^~

This change fixes the comparison to do what seems to have been intended. Related
to #1833.
lib/sparse/general.c