[lttng-dev] [PATCH 1/3] Improve delete of configuration

David Goulet david.goulet at polymtl.ca
Wed May 30 08:28:46 EDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On 30/05/12 05:10 AM, Francis Giraldeau wrote:
> Le 2012-05-29 20:43, David Goulet a écrit :
>>> + if (!config_exists(config_path)) + goto done;
>> 
>> Please add {} even for a one liner if().
> 
> I used checkpatch.pl from kernel scripts and the standard there is to 
> remove them. I can add them, but then patches will not pass the check. IMHO
> I would follow the kernel style, since this makes easier for everyone to
> check their patches. Or maybe there are options to skip on-line-if-brace
> check? There is "--ignore BRACES" but then errors are reported, only the
> description is not shown. Will wait for your input on this.

Agreed but we don't use all of the kernel standard ;) ... the braces around
the if...then is almost the only thing different.

Thanks!
David

> 
>> 
>>> + + DBG("Removing %s\n", config_path); ret = remove(config_path); if 
>>> (ret < 0) { perror("remove config file"); } - +done:
>> 
>> Accross the code, we uses "end:" instead of "done:".
> 
> ok
> 
>> 
>>> free(config_path); }
>> 
>>> /* + * config_destroy_default + * + * Destroys the default config + */
>>>  +
>> 
>> No space here and no double space before "*__Destr..." . Most of the 
>> comments are still like that in that file but we are trying to move away
>>  from that comments format.
> 
> ok, better to put only a space, I put two because there were two at many 
> places. Will then provide a patch to fix other comments in the same file.
> 
> Francis
> 
> 
> 
> _______________________________________________ lttng-dev mailing list 
> lttng-dev at lists.lttng.org 
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBAgAGBQJPxhJ+AAoJEELoaioR9I022gYH/27ZkGP2opkvjVNF0mo7Sp7j
YQrJyl87oi7uJ/4QWQt2GHkDnofFJKAqL4P5hgpkNeU2sTr9xPvtoMqm6GeweUW0
QwKMQ2VT85Oim98GuY+4jBPkqhehEy+eEPbsmKRJwUoKeJTpJ+uCAE8aZdmP8Qis
cTMx2P+z4gb32230kJNAzSq6tyBkYrosC2rNTgV6ez+2Tml/LncqKXSlrtSG1Nrt
jfiFoAjryX5ucH7M5hT60DLVWYxUkzaZu1bv4z2KalBVm212tfxIU64s9Yd9oUFS
hf5VPXcycj5W0DipQdVeqzBZEJNf5dXqilTBYB03g2nOClQdujaKggAXLJmUluM=
=QkM+
-----END PGP SIGNATURE-----



More information about the lttng-dev mailing list