Reformatting code

Stefan (metze) Metzmacher metze at samba.org
Fri Jul 22 03:14:54 MDT 2011


Am 22.07.2011 10:35, schrieb Volker Lendecke:
> On Fri, Jul 22, 2011 at 10:04:06AM +0200, Stefan (metze) Metzmacher wrote:
>> http://lists.samba.org/archive/samba-technical/2011-June/078234.html
> 
> Yes, I know about that one. Has there been a resolution? I
> think even back then I replied with some doubtful mail. Has
> there been a definitive decision that this change is to be
> done?

No, but most of us thought it is a good idea to switch to
just one style of using bool values.

> And, please explain to me what bug this fixes. I had always
> thought that this is purely cosmetic.

It is purely cosmetic, but at least I think it makes the code
more consistent and it may avoid confusion for new developers
in future.

For things like 'uint16' vs. uint16_t we would be able to get rid
of the complex configure check related to rpc/rpc.h,
which I find very confusing.

At least having a simple set of basic types (from stdbool.h and stdint.h)
makes the whole code base much easier to understand, at least for me.
(Today I know that uint16 and uint16_t are the same (at least on linux),
 but it was very confusing for me when I started with samba hacking).

> If pure reformattings are now a wanted code change in Samba,
> we can certainly "improve" a LOT of code.

In the last days I saw a lot of really ugly code, while doing the
libsmb cleanups (which prepare multiprotcol (smb1/smb2) support).
And I think it's ok to fix format related stuff, when someone
works on the related code. (Still we should not abuse this).

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110722/634f0d52/attachment.pgp>


More information about the samba-technical mailing list