Document assumptions that are being made to avoid division by zero #11133

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:div0 changing 3 files +3 −0
  1. practicalswift commented at 2:01 PM on August 25, 2017: contributor

    Document assumptions (via assert(…):s) that are being made to avoid division by zero.

    Rationale:

    • Make it clear to human reviewers and non-human static analyzers that what might look like potential division by zero cases are written the way they are intentionally (these cases are currently flagged by various static analyzers).
  2. practicalswift renamed this:
    Document assumptions that must be fulfilled to avoid division by zero
    Document assumptions that are being made to avoid division by zero
    on Aug 25, 2017
  3. practicalswift force-pushed on Aug 25, 2017
  4. laanwj added the label Refactoring on Aug 26, 2017
  5. meshcollider commented at 12:52 PM on August 26, 2017: contributor

    Hmm does adding that text change the behavior of the static analyzers? Otherwise it seems pretty human readable to me already, they aren't exactly complicated asserts :)

  6. sipa commented at 7:31 PM on August 27, 2017: member

    Agree with @MeshCollider.

  7. danra commented at 9:31 PM on August 27, 2017: contributor

    utACK for asserting != 0 where added. Agree with @MeshCollider that the extra text is redundant.

  8. Document assumptions that are being made to avoid division by zero 55509f1a11
  9. practicalswift force-pushed on Aug 28, 2017
  10. practicalswift commented at 7:25 AM on August 28, 2017: contributor

    @MeshCollider @sipa @danra Thanks for reviewing! Redundant comments removed. Looks good? :-)

  11. laanwj commented at 11:40 AM on October 12, 2017: member

    utACK 55509f1

  12. laanwj merged this on Oct 12, 2017
  13. laanwj closed this on Oct 12, 2017

  14. laanwj referenced this in commit a865b38bf3 on Oct 12, 2017
  15. laanwj referenced this in commit ffa5159cef on Oct 18, 2017
  16. jasonbcox referenced this in commit 602b5fd67d on Jul 25, 2019
  17. jonspock referenced this in commit 9240e5b16f on Sep 5, 2019
  18. jonspock referenced this in commit cf753775d9 on Sep 6, 2019
  19. proteanx referenced this in commit 6c9f75b82b on Sep 6, 2019
  20. PastaPastaPasta referenced this in commit 0f6d7f029b on Dec 22, 2019
  21. PastaPastaPasta referenced this in commit 37482b673c on Dec 22, 2019
  22. PastaPastaPasta referenced this in commit 78d0dcf26d on Jan 2, 2020
  23. PastaPastaPasta referenced this in commit e6583f1493 on Jan 2, 2020
  24. PastaPastaPasta referenced this in commit a760669f55 on Jan 4, 2020
  25. PastaPastaPasta referenced this in commit 73dfcc1b8b on Jan 4, 2020
  26. PastaPastaPasta referenced this in commit 4ff04d2fa1 on Jan 12, 2020
  27. PastaPastaPasta referenced this in commit 48674d576d on Jan 12, 2020
  28. PastaPastaPasta referenced this in commit e39ec04f50 on Jan 12, 2020
  29. PastaPastaPasta referenced this in commit d081812092 on Jan 12, 2020
  30. PastaPastaPasta referenced this in commit 3b4f241e76 on Jan 12, 2020
  31. PastaPastaPasta referenced this in commit 04d29ce352 on Jan 12, 2020
  32. PastaPastaPasta referenced this in commit 35d8343163 on Jan 12, 2020
  33. PastaPastaPasta referenced this in commit 16e8ca699a on Jan 12, 2020
  34. PastaPastaPasta referenced this in commit e21ae89c5b on Jan 12, 2020
  35. PastaPastaPasta referenced this in commit 6590d1dcb5 on Jan 12, 2020
  36. PastaPastaPasta referenced this in commit 078638d3a6 on Jan 12, 2020
  37. PastaPastaPasta referenced this in commit 93e979e4d4 on Jan 12, 2020
  38. PastaPastaPasta referenced this in commit 1665e724e2 on Jan 12, 2020
  39. PastaPastaPasta referenced this in commit 467c52c75f on Jan 16, 2020
  40. ckti referenced this in commit ea8a468b71 on Mar 28, 2021
  41. ckti referenced this in commit 117b62c705 on Mar 28, 2021
  42. practicalswift deleted the branch on Apr 10, 2021
  43. gades referenced this in commit 0ccc384401 on Feb 22, 2022
  44. gades referenced this in commit 43d71f5cda on Feb 22, 2022
  45. DrahtBot locked this on Aug 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-16 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me