1f3d2d9edc
Use kstrdup when the goal of an allocation is copy a string into the allocated region. The Coccinelle semantic patch that makes this change is as follows: // <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: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Christoph Hellwig <hch@lst.de> |
||
---|---|---|
.. | ||
aicasm | ||
.gitignore | ||
aic7xxx_93cx6.c | ||
aic7xxx_93cx6.h | ||
aic7xxx_core.c | ||
aic7xxx_inline.h | ||
aic7xxx_osm_pci.c | ||
aic7xxx_osm.c | ||
aic7xxx_osm.h | ||
aic7xxx_pci.c | ||
aic7xxx_pci.h | ||
aic7xxx_proc.c | ||
aic7xxx_reg_print.c_shipped | ||
aic7xxx_reg.h_shipped | ||
aic7xxx_seq.h_shipped | ||
aic7xxx.h | ||
aic7xxx.reg | ||
aic7xxx.seq | ||
aic79xx_core.c | ||
aic79xx_inline.h | ||
aic79xx_osm_pci.c | ||
aic79xx_osm.c | ||
aic79xx_osm.h | ||
aic79xx_pci.c | ||
aic79xx_pci.h | ||
aic79xx_proc.c | ||
aic79xx_reg_print.c_shipped | ||
aic79xx_reg.h_shipped | ||
aic79xx_seq.h_shipped | ||
aic79xx.h | ||
aic79xx.reg | ||
aic79xx.seq | ||
aic7770_osm.c | ||
aic7770.c | ||
aiclib.c | ||
aiclib.h | ||
cam.h | ||
Kconfig.aic7xxx | ||
Kconfig.aic79xx | ||
Makefile | ||
queue.h | ||
scsi_iu.h | ||
scsi_message.h |