]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tracetool: avoid space after "*" in arg types
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 16 Sep 2025 08:16:33 +0000 (09:16 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 16 Sep 2025 17:31:40 +0000 (13:31 -0400)
QEMU code style is to have no whitespace between "*" and the
arg name. Since generated trace code will soon be added to
git, make it comply with code style.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20250916081638.764020-4-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
scripts/tracetool/__init__.py

index 2ae2e562d6444404f17aaf4ec9d1b4152ba76ded..0f33758870627e5b7c61e003c0718405e2cd29e6 100644 (file)
@@ -170,10 +170,16 @@ class Arguments:
 
     def __str__(self):
         """String suitable for declaring function arguments."""
+        def onearg(t, n):
+            if t[-1] == '*':
+                return "".join([t, n])
+            else:
+                return " ".join([t, n])
+
         if len(self._args) == 0:
             return "void"
         else:
-            return ", ".join([ " ".join([t, n]) for t,n in self._args ])
+            return ", ".join([ onearg(t, n) for t,n in self._args ])
 
     def __repr__(self):
         """Evaluable string representation for this object."""