From 3a37388d4368d033f554baac0e49ce42b7acab3c Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Sat, 25 Apr 2009 13:13:50 +0000 Subject: [PATCH] Updated splint annotations. --- lib/commonio.c | 4 ++-- lib/commonio.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/commonio.c b/lib/commonio.c index dfd6e1e1..d9966126 100644 --- a/lib/commonio.c +++ b/lib/commonio.c @@ -61,7 +61,7 @@ static /*@null@*/ /*@dependent@*/FILE *fopen_set_perms ( const struct stat *sb); static int create_backup (const char *, FILE *); static void free_linked_list (struct commonio_db *); -static void add_one_entry (struct commonio_db *, struct commonio_entry *); +static void add_one_entry (struct commonio_db *, /*@owned@*/struct commonio_entry *); static bool name_is_nis (const char *name); static int write_all (const struct commonio_db *); static struct commonio_entry *find_entry_by_name (struct commonio_db *, @@ -426,7 +426,7 @@ int commonio_unlock (struct commonio_db *db) } -static void add_one_entry (struct commonio_db *db, struct commonio_entry *p) +static void add_one_entry (struct commonio_db *db, /*@owned@*/struct commonio_entry *p) { p->next = NULL; p->prev = db->tail; diff --git a/lib/commonio.h b/lib/commonio.h index 210f803f..0b9c8061 100644 --- a/lib/commonio.h +++ b/lib/commonio.h @@ -46,7 +46,8 @@ struct commonio_entry { /*@null@*/char *line; /*@null@*/void *eptr; /* struct passwd, struct spwd, ... */ - /*@null@*/struct commonio_entry *prev, *next; + /*@dependent@*/ /*@null@*/struct commonio_entry *prev; + /*@owned@*/ /*@null@*/struct commonio_entry *next; bool changed:1; }; -- 2.40.0