linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial_core: fix sizeof(pointer)
@ 2012-09-06  2:27 Fengguang Wu
  2012-09-06  6:59 ` Jiri Slaby
  2012-09-06 11:48 ` Alan Cox
  0 siblings, 2 replies; 4+ messages in thread
From: Fengguang Wu @ 2012-09-06  2:27 UTC (permalink / raw)
  To: linux-serial; +Cc: Alan Cox, Jiri Slaby, Greg Kroah-Hartman, LKML

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));
 
 	retinfo->type	    = uport->type;
 	retinfo->line	    = uport->line;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-06 11:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-06  2:27 [PATCH] serial_core: fix sizeof(pointer) Fengguang Wu
2012-09-06  6:59 ` Jiri Slaby
2012-09-06  7:08   ` Fengguang Wu
2012-09-06 11:48 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).