aboutsummaryrefslogtreecommitdiffstats
path: root/uid.c
diff options
context:
space:
mode:
Diffstat (limited to 'uid.c')
-rw-r--r--uid.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/uid.c b/uid.c
index 12405519..33e01293 100644
--- a/uid.c
+++ b/uid.c
@@ -470,8 +470,10 @@ void write_saved_lists(struct query *hostlist, const char *idfile)
/* if all lists are empty, nuke the file */
idcount = 0;
for (ctl = hostlist; ctl; ctl = ctl->next) {
- if (ctl->oldsaved)
- idcount++;
+ for (idp = ctl->oldsaved; idp; idp = idp->next)
+ if (idp->val.status.mark == UID_SEEN
+ || idp->val.status.mark == UID_DELETED)
+ idcount++;
}
/* either nuke the file or write updated last-seen IDs */