diff options
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r-- | uemis-downloader.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c index d0c3de13e..5d8b07c01 100644 --- a/uemis-downloader.c +++ b/uemis-downloader.c @@ -793,14 +793,14 @@ static char *uemis_get_divenr(char *deviceidstr) char divenr[10]; deviceid = atoi(deviceidstr); - for (i = 0; i < dive_table.nr; i++) { - struct divecomputer *dc = &dive_table.dives[i]->dc; - while (dc) { + struct dive *d; + for_each_dive (i, d) { + struct divecomputer *dc; + for_each_dc(d, dc) { if (dc->model && !strcmp(dc->model, "Uemis Zurich") && (dc->deviceid == 0 || dc->deviceid == 0x7fffffff || dc->deviceid == deviceid) && dc->diveid > maxdiveid) maxdiveid = dc->diveid; - dc = dc->next; } } snprintf(divenr, 10, "%d", maxdiveid); |