Hello Tito,

just a few comments:

On Tuesday 08 January 2008 22:42:23 Tito wrote:
>                         if (ch == '\n' || ch == EOF) {
>  line_end:
>                                 /* Save the size of the line to the list */
>                                 size = xmalloc(sizeof(int *));

Shouldn't this be xmalloc(sizeof(int))?

>                                 llist_add_to(&list, memcpy(size, &i, 
sizeof(int))); 
>                                 llist_add_to(&list, line); 

More generally would it make sense to define a structure holding both the 
string size and the string pointer? This would allow to call llist_add_to() 
only once per line instead of twice (same for llist_pop) ...

JC



_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to