lkml.org 
[lkml]   [2012]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] serial_core: fix sizeof(pointer)
On 09/06/2012 04:27 AM, Fengguang Wu wrote:
> sizeof when applied to a pointer typed expression gives the
> size of the pointer.
>
> Generated by: scripts/coccinelle/misc/noderef.cocci
>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>
> cocci-output-38612-39d907-serial_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -640,7 +640,7 @@ static void uart_get_info(struct tty_por
> {
> struct uart_port *uport = state->uart_port;
>
> - memset(retinfo, 0, sizeof(retinfo));
> + memset(retinfo, 0, sizeof(*retinfo));

Hmm, what tree is this against? I have:

memset(&tmp, 0, sizeof(tmp));

thanks,
--
js
suse labs


\
 
 \ /
  Last update: 2012-09-06 09:41    [W:0.063 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site