mirror of
https://github.com/openbsd/ports.git
synced 2026-06-18 07:24:23 +02:00
52e35ac9c3
error: chained comparison 'X < Y <= Z' does not behave the same as a mathematical expression [-Wparentheses]
24 lines
573 B
Plaintext
24 lines
573 B
Plaintext
error: chained comparison 'X < Y <= Z' does not behave the same as a mathematical expression [-Wparentheses
|
|
|
|
Index: src/lib/cd.c
|
|
--- src/lib/cd.c.orig
|
|
+++ src/lib/cd.c
|
|
@@ -144,7 +144,7 @@ int cd_get_ntrack (Cd *cd)
|
|
|
|
Track *cd_get_track (Cd *cd, int i)
|
|
{
|
|
- if (0 < i <= cd->ntrack)
|
|
+ if (0 < i && i <= cd->ntrack)
|
|
return cd->track[i - 1];
|
|
|
|
return NULL;
|
|
@@ -277,7 +277,7 @@ int track_get_nindex (Track *track)
|
|
|
|
long track_get_index (Track *track, int i)
|
|
{
|
|
- if (0 <= i < track->nindex)
|
|
+ if (0 <= i && i < track->nindex)
|
|
return track->index[i];
|
|
|
|
return -1;
|