Commit Graph

9 Commits

Author SHA1 Message Date
Lucas De Marchi 5a8a8c9014 Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00
Carsten Haitzler ddc6ba2c2a uncrustify eina.
SVN revision: 50573
2010-07-28 02:37:05 +00:00
Gustavo Sverzut Barbieri 54b0b06c1e Better resize rotine, linear instead of double.
Increment in steps linearly instead of doubling them, otherwise it
will get to maximum limit of 4096 too soon.

Also replace the loop with simple math.



SVN revision: 46585
2010-02-27 16:41:24 +00:00
Gustavo Sverzut Barbieri bba70aef2e eina_strbuf_insert variants and fix leak with eina_strbuf_append_escaped()
SVN revision: 46521
2010-02-26 21:33:17 +00:00
Gustavo Sverzut Barbieri f32672764d add eina_strbuf_append_length()
SVN revision: 46516
2010-02-26 20:09:36 +00:00
Sebastian Dransfeld 9df3524f3a Good coverage for strbuf
SVN revision: 46101
2010-02-11 21:53:00 +00:00
Sebastian Dransfeld a28ba1876e More tests for strbuf
SVN revision: 46095
2010-02-11 21:21:12 +00:00
Sebastian Dransfeld 0ed3fb726b Tests for strbuf
SVN revision: 46089
2010-02-11 20:08:52 +00:00
Sebastian Dransfeld 3d6a752111 Add simple test for strbuf
Need more

SVN revision: 46024
2010-02-09 21:05:47 +00:00