Skip to content

Commit

Permalink
Change format of backwards-loop to allow correct types
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedThree committed Mar 25, 2024
1 parent a04cfdd commit 920ec70
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libdap4/d4odom.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,13 @@ d4odom_more(D4odometer* odom)
d4size_t
d4odom_next(D4odometer* odom)
{
int i; /* do not make unsigned */
d4size_t count;
if(odom->rank == 0) { /*scalar*/
odom->index[0]++;
return 0;
}
count = d4odom_offset(odom); /* convenience */
for(i=odom->rank-1;i>=0;i--) {
for(size_t i=odom->rank; i-- >0;) {
odom->index[i] += odom->stride[i];
if(odom->index[i] < odom->stop[i]) break;
if(i == 0) break; /* leave the 0th entry if it overflows*/
Expand Down

0 comments on commit 920ec70

Please sign in to comment.