Files
bind9/lib/dns
Ondřej Surý 358affe585 Use switch instead of if when evaluating curves
Previously, the code would do:

    REQUIRE(alg == CURVE1 || alg == CURVE2);

    [...]

    if (alg == CURVE1) { /* code for CURVE1 */ }
    else { /* code for CURVE2 */ }

This approach is less extensible and also more prone to errors in case
the initial REQUIRE() is forgotten.  The code has been refactored to
use:

    REQUIRE(alg == CURVE1 || alg == CURVE2);

    [...]

    switch (alg) {
    case CURVE1: /* code for CURVE1 */; break;
    case CURVE2: /* code for CURVE2 */; break;
    default: INSIST(0);
    }

(cherry picked from commit cf30e7d0d1)
2020-05-01 06:54:27 +02:00
..
2020-04-16 07:56:38 +02:00
2020-04-16 07:56:37 +02:00
2020-04-16 23:07:40 +02:00
2020-02-27 08:54:02 +01:00
2020-04-20 09:43:23 +02:00
2020-04-30 00:09:48 +10:00
2020-03-12 00:38:37 -07:00
2020-02-16 18:07:27 +01:00
2020-02-16 18:07:27 +01:00
2020-03-12 00:38:37 -07:00
2020-03-13 13:17:46 +11:00
2020-02-21 07:05:31 +00:00
2020-04-03 10:04:24 +02:00
2020-04-03 10:04:07 +02:00
2020-04-16 16:04:28 +02:00