llist_t and llist_pop
Yann E. MORIN
yann.morin.1998 at anciens.enib.fr
Fri May 19 15:30:41 UTC 2006
On Friday 19 May 2006 164, Robert P. J. Day wrote:
> ah, i just noticed what's happening with that "void*" versus "char*"
> in the llist routines. normally, you'd expect that a list would
> accept completely generic "void*" pointers to store.
> but if you look at archival/tar.c, line 305:
>
> if (excluded_files->data[0] == '/') {
>
> what that's clearly doing is treating the data pointer as a "char*" so
> that it can immediately do a character comparison. the *proper* way,
> i would think, is to have to cast that "void*" to "char*" first. in
> short, the code is being lazy so it doesn't have to do that cast every
> time it needs to do a character comparison.
>
> at least, that's the way i read it. the proper fix would be for llist
> to use *only* "void*" pointers, and have all of the calling routines
> be forced to do the proper casting.
Doing this at this very moment... Lots of files impacted.
Is it acceptable to not cast when calling llist_add_to{,_end}?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software Designer | \ / CAMPAIGN | ^ |
| --==< °_° >==-- °---.----------------: X AGAINST | /e\ There is no |
| web: ymorin.free.fr | SETI at home 3808 | / \ HTML MAIL | """ conspiracy. |
°---------------------°----------------°------------------°--------------------°
More information about the busybox
mailing list