]> granicus.if.org Git - shadow/commitdiff
Updated splint annotations.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 25 Apr 2009 15:18:49 +0000 (15:18 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 25 Apr 2009 15:18:49 +0000 (15:18 +0000)
lib/commonio.c

index 1ea0fafa218bc4eeb4d71f37a8ba33fcade4fb69..d768eebb83dfd6e2eca9a04523f2a40b259b3b0d 100644 (file)
@@ -61,7 +61,10 @@ 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 *, /*@owned@*/struct commonio_entry *);
+static void add_one_entry (
+       struct commonio_db *db,
+       /*@owned@*/struct commonio_entry *p)
+       /*@requires isnull p->next, p->prev@*/;
 static bool name_is_nis (const char *name);
 static int write_all (const struct commonio_db *);
 static /*@dependent@*/ /*@null@*/struct commonio_entry *find_entry_by_name (
@@ -428,7 +431,9 @@ int commonio_unlock (struct commonio_db *db)
 }
 
 
-static void add_one_entry (struct commonio_db *db, /*@owned@*/struct commonio_entry *p)
+static void add_one_entry (struct commonio_db *db,
+                           /*@owned@*/struct commonio_entry *p)
+       /*@requires isnull p->next, p->prev@*/
 {
        p->next = NULL;
        p->prev = db->tail;
@@ -457,13 +462,16 @@ static bool name_is_nis (const char *name)
 #endif
 
 #if KEEP_NIS_AT_END
-static void add_one_entry_nis (struct commonio_db *, struct commonio_entry *);
+static void add_one_entry_nis (struct commonio_db *db,
+                               /*@owned@*/struct commonio_entry *newp)
+       /*@requires isnull newp->next, newp->prev@*/;
 
 /*
  * Insert an entry between the regular entries, and the NIS entries.
  */
-static void
-add_one_entry_nis (struct commonio_db *db, struct commonio_entry *newp)
+static void add_one_entry_nis (struct commonio_db *db,
+                               /*@owned@*/struct commonio_entry *newp)
+       /*@requires isnull newp->next, newp->prev@*/
 {
        struct commonio_entry *p;