On Fri, May 23, 2014 at 16:29, Brendan MacDonell wrote:
>
> I think this can be extended to expressions, not just identifiers:
>
> @@
> expression x;
> @@
> -if (x) { free(x); }
> +free(x);
>
> This catches another 47 instances. A patch against CVS follows.
Thanks, applied.
On 05/23/2014 09:29 PM, Brendan MacDonell wrote:
>
> I think this can be extended to expressions, not just identifiers:
>
> @@
> expression x;
> @@
> -if (x) { free(x); }
> +free(x);
>
Yes you are right. Shame on me.
Regards,
Cyril Roelandt.
I think this can be extended to expressions, not just identifiers:
@@
expression x;
@@
-if (x) { free(x); }
+free(x);
This catches another 47 instances. A patch against CVS follows.
diff -u -p a/src/apps/s_server.c b/src/apps/s_server.c
--- a/src/apps/s_server.c
+++ b/src/apps/s_serv
> Hello,
>
> After reading
> http://www.openbsd.org/papers/bsdcan14-libressl/mgp00015.html , I
> thought I'd help a bit with cleaning libssl by running this
> Coccinelle[1] script on src/lib/libssl:
>
>
> @@
> identifier x;
> @@
> -if (x) { free(x); }
> +free(x);
>
>
> It removes unnecessary N
Hello,
After reading
http://www.openbsd.org/papers/bsdcan14-libressl/mgp00015.html , I
thought I'd help a bit with cleaning libssl by running this
Coccinelle[1] script on src/lib/libssl:
@@
identifier x;
@@
-if (x) { free(x); }
+free(x);
It removes unnecessary NULL checks that happen before a