[Git][NTPsec/ntpsec][master] Avoid returning result of function that doesn't return

Matt Selsky gitlab at mg.gitlab.com
Mon Jan 7 00:16:39 UTC 2019


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
843c1d9c by Matt Selsky at 2019-01-06T21:28:23Z
Avoid returning result of function that doesn't return

The result of 'check_sizeof_host' is used even though it is always None.

check_sizeof_cross does use return, but only to exit the function early.

- - - - -


1 changed file:

- wafhelpers/check_sizeof.py


Changes:

=====================================
wafhelpers/check_sizeof.py
=====================================
@@ -80,6 +80,6 @@ def check_sizeof_cross(ctx, header, sizeof, mandatory=True):
 @conf
 def check_sizeof(*kwargs):
     if kwargs[0].env.ENABLE_CROSS:
-        return check_sizeof_cross(*kwargs)
+        check_sizeof_cross(*kwargs)
     else:
-        return check_sizeof_host(*kwargs)
+        check_sizeof_host(*kwargs)



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/843c1d9cb5dce564ef31c5fc53fbc9733f261d92

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/843c1d9cb5dce564ef31c5fc53fbc9733f261d92
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20190107/ee08f704/attachment.html>


More information about the vc mailing list