diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-10-04 18:34:30 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-05 04:09:02 +0300 |
commit | 420aab94543f171eabb9065a6aae5408aad0fbdc (patch) | |
tree | 9e4838f28c3f077b7e14290ac7b40e6928a1afba /core/libdivecomputer.c | |
parent | 8a1839610458ea788304f700886d54af680d6e53 (diff) | |
download | subsurface-420aab94543f171eabb9065a6aae5408aad0fbdc.tar.gz |
Cleanup: don't produce no-dives error message in libdivecomputer.c
If no dives were downloaded in do_libdivecomputer_import(), an
error message would be produced. To check for downloaded dives,
the function would access the global downloadTable instead of
the actual table the dives are imported to (at the moment the
same - but the interface allows for a different table).
Move the error-creation to the caller to avoid this situation.
An alternative option would be to check the actual table the
dives were supposed to be downloaded to. But from a program-logic
point of view "no dives" does not seem like an error condition.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/libdivecomputer.c')
-rw-r--r-- | core/libdivecomputer.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index fcc774425..e6c74f115 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -1422,8 +1422,6 @@ const char *do_libdivecomputer_import(device_data_t *data) data->device = NULL; dc_iostream_close(data->iostream); data->iostream = NULL; - if (!downloadTable.nr) - dev_info(data, translate("gettextFromC", "No new dives downloaded from dive computer")); } dc_context_free(data->context); |