linux/fs/ocfs2/dlm
Julia Lawall 316ce2ba8e fs/ocfs2/dlm: Use kstrdup
Use kstrdup when the goal of an allocation is copy a string into the
allocated region.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to;
expression flag,E1,E2;
statement S;
@@

-  to = kmalloc(strlen(from) + 1,flag);
+  to = kstrdup(from, flag);
   ... when != \(from = E1 \| to = E1 \)
   if (to==NULL || ...) S
   ... when != \(from = E2 \| to = E2 \)
-  strcpy(to, from);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
2010-05-18 12:31:11 -07:00
..
dlmapi.h ocfs2/trivial: Remove trailing whitespaces 2010-01-25 19:20:51 -08:00
dlmast.c ocfs2: print node # when tcp fails 2010-05-05 18:18:08 -07:00
dlmcommon.h ocfs2/dlm: Increase o2dlm lockres hash size 2010-05-05 18:20:01 -07:00
dlmconvert.c ocfs2: print node # when tcp fails 2010-05-05 18:18:08 -07:00
dlmconvert.h
dlmdebug.c ocfs2/dlm: Fix printing of lockname 2010-02-08 13:01:31 -08:00
dlmdebug.h [PATCH 2/3] ocfs2/dlm: Silence build warnings 2008-05-30 15:15:10 -07:00
dlmdomain.c fs/ocfs2/dlm: Use kstrdup 2010-05-18 12:31:11 -07:00
dlmdomain.h
dlmlock.c fs/ocfs2/dlm: Drop memory allocation cast 2010-05-18 12:31:10 -07:00
dlmmaster.c fs/ocfs2/dlm: Drop memory allocation cast 2010-05-18 12:31:10 -07:00
dlmrecovery.c ocfs2: print node # when tcp fails 2010-05-05 18:18:08 -07:00
dlmthread.c headers: utsname.h redux 2009-09-23 18:13:10 -07:00
dlmunlock.c ocfs2: print node # when tcp fails 2010-05-05 18:18:08 -07:00
dlmver.c ocfs2: bump version number 2008-01-25 15:05:46 -08:00
dlmver.h
Makefile ocfs2_dlmfs: Move to its own directory 2010-02-26 15:41:14 -08:00