Skip to content

Change return 0, 1 to return S2N_SUCCESS, S2N_FAILURE #1897

Open
@maddeleine

Description

@maddeleine

Problem:

We have a lot of s2n functions that indicate success by returning 0 and failure by returning 1. We should returning the S2N_SUCCESS/S2N_FAILURE consts since they are more readable and they exist.

Solution:

Change every return 0 to return S2N_SUCCESS; every return 1 to return S2N_FAILURE;

  • Does this change what S2N sends over the wire? No
  • Does this change any public APIs? No
  • Which versions of TLS will this impact? N/A

Requirements / Acceptance Criteria:

  • There is no more "return 0/1;" in the code
  • Some sort of script is added to check for the presence of S2N_SUCCESS in every function. Not sure if we need a check for S2N_FAILURE.
  • RFC links: N/A
  • **Related Issues:**N/A
  • Will the Usage Guide or other documentation need to be updated? No
  • Testing: Our regular code suite.
    • Will this change trigger SAW changes? No
    • Should this change be fuzz tested? No

Out of scope:

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions