[PATCH] Use void* for data in llist_t instead of char*

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Mon May 29 12:14:37 PDT 2006


On Monday 29 May 2006 062, Rob Landley wrote:
> On Friday 19 May 2006 4:48 pm, Yann E. MORIN wrote:
> > Please find attached the diff to transfrom the char* data into a void*
> > data, and the associated corrections.
> How much of this patch is still needed?  I left the data type in the list as 
> char *, but made all the functions use void.  So anybody actually 
> dereferencing data without typecasting it gets a char *.  Nothing broke that 
> I'm aware of...

My patch was /almost/ the same as yours: change char* to void*, and update the
functions and their prototypes.

Then I compiled, and every warning that came up which didn't previously was
fixed. That implied fixing:
  - networking/ifupdown.c  : use an explicit cast
  - archival/tar.c         : use two explicit casts

Nothing else was touched. Lemme see your commit message log...
Ha. What there's more in your commit is the parameter renaming. What's missing
is the three casts.

Anyway, I guess that's no big problem, but explicitly casting where needed
should be considered a Good Thing (TM), and leaving the compiler decide on
its own a Bad Thing (TM).

At your option to apply the two applets patch.

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