vmstate-static-checker:remove this redundant return
PATCH 1/1 vmstate-static-checker:remove this redundant return
Jump statements, such as return and continue let you change the default flow of program execution, but jump statements that direct the control flow to the original direction are just a waste of keystrokes.
--- scripts/vmstate-static-checker.py | 1 - 1 file changed, 1 deletion(-)
scripts/vmstate-static-checker.py +0 -1
@@ -367,7 +367,6 @@ def check_machine_type(s, d): if s["Name"] != d["Name"]: print("Warning: checking incompatible machine types:", end=' ') print("\"" + s["Name"] + "\", \"" + d["Name"] + "\"") - return def main():
Signature · 1 line
2.30.0.windows.2
Quoted 24 lines · dinglimin
Jump statements, such as return and continue let you change the default flow of program execution, but jump statements that direct the control flow to the original direction are just a waste of keystrokes.
Signed-off-by dinglimin <[email protected]>--- scripts/vmstate-static-checker.py | 1 - 1 file changed, 1 deletion(-)scripts/vmstate-static-checker.py +0
-2@@ -367,7 +367,6 @@ def check_machine_type(s, d): if s["Name"] != d["Name"]: print("Warning: checking incompatible machine types:", end=' ') print("\"" + s["Name"] + "\", \"" + d["Name"] + "\"") - return def main(): --
Quoted 2 lines
2.30.0.windows.2
This can go through the trivial branch.
Laurent Vivier
AppliedLe 28/09/2022 à 11:03, dinglimin a écrit :
Quoted 15 lines
Jump statements, such as return and continue let you change the default flow of program execution, but jump statements that direct the control flow to the original direction are just a waste of keystrokes.
Signed-off-by dinglimin <[email protected]>--- scripts/vmstate-static-checker.py | 1 - 1 file changed, 1 deletion(-)scripts/vmstate-static-checker.py +0
-0
scripts/vmstate-static-checker.py def check_machine_type(s, d): · line 372
Quoted 7 lines
scripts/vmstate-static-checker.py +0
-1@@ -367,7 +367,6 @@ def check_machine_type(s, d): if s["Name"] != d["Name"]: print("Warning: checking incompatible machine types:", end=' ') print("\"" + s["Name"] + "\", \"" + d["Name"] + "\"") - return def main():
Applied to my trivial-patches branch.
Thanks,
Laurent