[Spice-devel] [PATCH spice-gtk 02/15] session: protect internal functions against NULL

Christophe Fergeau cfergeau at redhat.com
Wed Nov 26 01:25:15 PST 2014


Hey,

On Tue, Nov 25, 2014 at 01:44:44PM -0600, Jonathon Jongsma wrote:
> In general spice code follows the C89 style of declaring all variables
> at the very beginning of a block. In fact, I have a vague recollection
> of being asked to move some of my variable declarations to the beginning
> of the function in the past. Here you are moving several statements
> above variable declarations. I'm certainly in full approval of this
> style of coding (as you might expect from a C++ guy...), but I just
> wanted to raise the question. 

Yup, I probably mentioned that at some point. Since then, I've noticed
that in a few places we already have mixed code and declarations
(-Wpedantic reports spice-foreign-menu-listener.c:154 and
quic_family_tmpl.c:77). We also use // in quite a few places.
I'd say we can just go with it as it seems noone feels it's really
important to enforce that.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20141126/6e0ed262/attachment.sig>


More information about the Spice-devel mailing list