Re: [PATCH v3] coccinelle: api: add kzfree script
From: Markus Elfring
Date: Mon Jun 15 2020 - 09:27:02 EST
â
> +virtual context
> +virtual patch
> +virtual org
> +virtual report
+virtual context, patch, org, report
Is such a SmPL code variant more succinct?
â
> +if (...)
> + \(memset@ok\|memzero_explicit@ok\)(...);
Would you like to tolerate any extra source code around such a function call
in an if branch?
â
> +(
> +* memset@m((T)E, 0, ...);
> +|
> +* memzero_explicit@m((T)E, ...);
> +)
â
I suggest to move a semicolon.
+(
+*memset@m((T)E, 0, ...)
+|
+*memzero_explicit@m((T)E, ...)
+);
â
> +- \(kfree\|vfree\|kvfree\)(E);
> ++ kvfree_sensitive(E, size);
â
Would you like to increase the precision a bit for the change specification?
+-\(kfree\|vfree\|kvfree\)
++kvfree_sensitive
+ (E
++ , size
+ );
â
> +(
> +- kfree(E);
> ++ kzfree(E);
> +|
> +- \(vfree\|kvfree\)(E);
> ++ kvfree_sensitive(E, size);
> +)
â
+(
+-kfree
++kzfree
+ (E)
+|
+-\(vfree\|kvfree\)
++kvfree_sensitive
+ (E
++ , size
+ )
+);
â
> +coccilib.org.print_todo(p[0],
> + "WARNING: opportunity for kzfree/kvfree_sensitive")
I suggest to align the second function parameter.
+coccilib.org.print_todo(p[0],
+ "WARNING: opportunity for kzfree/kvfree_sensitive")
Regards,
Markus