Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

By defining a macro to adapt the comparison function to have a return value compliant with convention (3), the code clearly illustrates its intent and agrees with implied behavior.

Risk Assessment

Code which does not conform to the common practices presented will be difficult to maintain. Bugs may easily arise when modifying helper functions which evaluate true/false or success/failure. Bugs may also easily arise when modifying code that tests for equality using a comparison function that obeys the same conventions as standard library functions like strcmp.

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

EXP20-C

medium

probable

medium

P8

L2