mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: replace fprintf to stderr by report_info()
Let's try to unify debugging output! Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b097c0a44f
commit
da7ea17b66
29 changed files with 171 additions and 170 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include "dive.h"
|
||||
#include "divelist.h"
|
||||
#include "divelog.h"
|
||||
#include "errorhelper.h"
|
||||
#include "membuffer.h"
|
||||
#include "subsurface-string.h"
|
||||
#include "table.h"
|
||||
|
|
@ -371,17 +372,17 @@ void add_dive_to_dive_site(struct dive *d, struct dive_site *ds)
|
|||
{
|
||||
int idx;
|
||||
if (!d) {
|
||||
fprintf(stderr, "Warning: add_dive_to_dive_site called with NULL dive\n");
|
||||
report_info("Warning: add_dive_to_dive_site called with NULL dive");
|
||||
return;
|
||||
}
|
||||
if (!ds) {
|
||||
fprintf(stderr, "Warning: add_dive_to_dive_site called with NULL dive site\n");
|
||||
report_info("Warning: add_dive_to_dive_site called with NULL dive site");
|
||||
return;
|
||||
}
|
||||
if (d->dive_site == ds)
|
||||
return;
|
||||
if (d->dive_site) {
|
||||
fprintf(stderr, "Warning: adding dive that already belongs to a dive site to a different site\n");
|
||||
report_info("Warning: adding dive that already belongs to a dive site to a different site");
|
||||
unregister_dive_from_dive_site(d);
|
||||
}
|
||||
idx = dive_table_get_insertion_index(&ds->dives, d);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue