]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: remove variable with ambiguous name in gdb.server/fileio-packets.py
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 29 Oct 2025 17:49:15 +0000 (13:49 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 30 Oct 2025 16:15:13 +0000 (12:15 -0400)
flake8 complains about:

  gdb/testsuite/gdb.server/fileio-packets.py:67:9: E741 ambiguous variable name 'l'

I think the variable is unnecessary anyway, inline the expression in the
format string.

Change-Id: Ib294f58e663e79e65de058139a770d572bafb282
Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.server/fileio-packets.py

index d76cb9a7440cbfe7f6380a07817ce5e59a264c71..11733868625fbf3e3beb9318cc57c8e95a74897f 100644 (file)
@@ -64,8 +64,7 @@ def decode_stat_reply(buf, byteorder="big"):
         or buf[3] != ord(";")
         or len(buf) != 68
     ):
-        l = len(buf)
-        print(f"decode_stat_reply failed: {buf}\t(length = {l})")
+        print(f"decode_stat_reply failed: {buf}\t(length = {len(buf)})")
         return None
 
     # Discard the 'F40;' prefix.  The rest is the 64 bytes of data to