gl_marshal.py: C style fixups
authorMarek Olšák <marek.olsak@amd.com>
Mon, 29 Aug 2022 23:17:33 +0000 (19:17 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 19 Oct 2022 04:23:05 +0000 (04:23 +0000)
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18199>

src/mapi/glapi/gen/gl_marshal.py

index 42c3670..0cb632f 100644 (file)
@@ -196,7 +196,7 @@ class PrintCode(gl_XML.gl_print_base):
         with indent():
             for p in fixed_params:
                 if p.count:
-                    p_decl = '{0} * {1} = cmd->{1};'.format(
+                    p_decl = '{0} *{1} = cmd->{1};'.format(
                             p.get_base_type_string(), p.name)
                 else:
                     p_decl = '{0} {1} = cmd->{1};'.format(
@@ -211,7 +211,7 @@ class PrintCode(gl_XML.gl_print_base):
 
             if variable_params:
                 for p in variable_params:
-                    out('{0} * {1};'.format(
+                    out('{0} *{1};'.format(
                             p.get_base_type_string(), p.name))
                 out('const char *variable_data = (const char *) (cmd + 1);')
                 i = 1
@@ -237,7 +237,7 @@ class PrintCode(gl_XML.gl_print_base):
             else:
                 struct = 'struct marshal_cmd_{0}'.format(func.name)
                 out('const unsigned cmd_size = (align(sizeof({0}), 8) / 8);'.format(struct))
-                out('assert (cmd_size == cmd->cmd_base.cmd_size);')
+                out('assert(cmd_size == cmd->cmd_base.cmd_size);')
                 out('return cmd_size;')
         out('}')