From 87575437d8173c7da48a4dee25399807c7bec9cb Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Wed, 26 May 2010 14:43:55 -0700 Subject: [PATCH] drivers/char/ppdev.c: use kasprintf kasprintf combines kmalloc and sprintf, and takes care of the size calculation itself. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression a,flag; expression list args; statement S; @@ a = - \(kmalloc\|kzalloc\)(...,flag) + kasprintf(flag,args) <... when != a if (a == NULL || ...) S ...> - sprintf(a,args); // Signed-off-by: Julia Lawall Cc: Michael Buesch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed