lkml.org 
[lkml]   [2004]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [announce] HVCS for inclusion in 2.6 tree
Ryan Arnold <rsa@us.ibm.com> wrote:
>

A little stylistic thing:

> + struct hvcs_struct *hvcsd = (struct hvcs_struct *)tty->driver_data;
> + struct hvcs_struct *hvcsd = (struct hvcs_struct *)tty->driver_data;
> + struct hvcs_struct *hvcsd = (struct hvcs_struct *)dev_instance;

It's not necessary to add a typecast when assigning to and from a void*.
In fact, it's harmful: if someone were to later change, say,
tty->driver_data to a `struct foo *', your typecast will suppress the
warning which we would very much like to receive.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site