[BusyBox 0000204]: move llist_add_to_end() to libbb and add llist_free()

bugs at busybox.net bugs at busybox.net
Tue Oct 4 14:29:11 UTC 2005


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=204 
====================================================================== 
Reported By:                bernhardf
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   204
Category:                   Other
Reproducibility:            N/A
Severity:                   trivial
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             04-02-2005 01:48 PST
Last Modified:              10-04-2005 07:29 PDT
====================================================================== 
Summary:                    move llist_add_to_end() to libbb and add
llist_free()
Description: 
Move llist_add_to_end() from ifupdown.c to libbb/llist_add_to.c
Add new llist_free() to libbb

Use llist_free() in grep.c, xargs.c (and pidof.c, patch in bug
http://busybox.net/bugs/view.php?id=168)
====================================================================== 

---------------------------------------------------------------------- 
 bernhardf - 05-02-05 10:02  
---------------------------------------------------------------------- 
I retract this patch (The snippet against xargs would have to be redone
proper, awk, sed and possibly other should be converted too).

xlist_t may better be dropped in favour of libbb.h's
typedef struct llist_s {
        char *data;
#ifdef LLIST_LENGTH
        size_t length;
#endif
        struct llist_s *link;
} llist_t;

Also, these should be implemented and perused throughout list-using code,
i guess:
extern llist_t *llist_add_to(llist_t *old_head, char *new_item);
extern llist_t *llist_add_to_end(llist_t *list_head, char *data);
extern void llist_free_one(llist_t *llist);
extern void llist_free(llist_t *llist); 

---------------------------------------------------------------------- 
 bernhardf - 10-04-05 07:29  
---------------------------------------------------------------------- 
llist_add_to_end was moved from ifupdown.c to libbb/llist.c.

Closing this bug now, although a couple of applets should peruse llist_t
instead of reinventing the wheel over and over.. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-02-05 01:48  bernhardf      New Issue                                    
04-02-05 01:48  bernhardf      File Added: llist-trivia.01.diff                 
  
05-02-05 10:02  bernhardf      Note Added: 0000200                          
10-04-05 07:29  bernhardf      Status                   assigned => closed  
10-04-05 07:29  bernhardf      Note Added: 0000597                          
======================================================================




More information about the busybox-cvs mailing list