1. 05 Feb, 2020 9 commits
    • Mark Andrews's avatar
      remove dead cleanup code. · b6c3a2f1
      Mark Andrews authored
      13836        if (zone != NULL)
      13837                dns_zone_detach(&zone);
      
           	null: At condition dz != NULL, the value of dz must be NULL.
           	dead_error_condition: The condition dz != NULL cannot be true.
      
      13838        if (dz != NULL) {
      
      	CID 1453456 (#1 of 1): Logically dead code (DEADCODE)
      	dead_error_begin: Execution cannot reach this statement:
      	dns_zone_detach(&dz->zone);.
      
      13839                dns_zone_detach(&dz->zone);
      13840                isc_mem_put(named_g_mctx, dz, sizeof(*dz));
      13841        }
      b6c3a2f1
    • Mark Andrews's avatar
      keymgr_keyrole couldn't emit "NOSIGN". · 1efc7550
      Mark Andrews authored
       92        } else {
       93                return ("ZSK");
       94        }
      
      	CID 1455900 (#1 of 1): Structurally dead code (UNREACHABLE)
      	unreachable: This code cannot be reached: return "NOSIGN";.
      
       95        return ("NOSIGN");
      1efc7550
    • Mark Andrews's avatar
      Remove dead error code. · 5fc9efba
      Mark Andrews authored
      128        return (ISC_R_SUCCESS);
      129
      
      	CID 1456146 (#1 of 1): Structurally dead code (UNREACHABLE)
      	unreachable: This code cannot be reached: {
      	   if (dst->labels[i] != N....
      
      130        do {
      5fc9efba
    • Mark Andrews's avatar
      'indentctx' is always defined. Just use it. · aa101260
      Mark Andrews authored
      402        ctx->serve_stale_ttl = 0;
      
      	notnull: At condition indentctx, the value of indentctx
      	cannot be NULL.  dead_error_condition: The condition indentctx
      	must be true.
      
      	CID 1456147 (#1 of 1): Logically dead code (DEADCODE)
      	dead_error_line: Execution cannot reach the expression
      	default_indent inside this statement: ctx->indent = (indentctx
      	? ....
      
      403        ctx->indent = indentctx ? *indentctx : default_indent;
      aa101260
    • Mark Andrews's avatar
      break was on wrong line. · 0be2dc9f
      Mark Andrews authored
       959                break;
      
      	CID 1457872 (#1 of 1): Structurally dead code (UNREACHABLE)
      	unreachable: This code cannot be reached:
      	isc__nm_incstats(sock->mgr,....
      
       960                isc__nm_incstats(sock->mgr, sock->statsindex[STATID_ACTIVE]);
       961        default:
      0be2dc9f
    • Mark Andrews's avatar
      dstkey is no longer used · 331b74d6
      Mark Andrews authored
      331b74d6
    • Mark Andrews's avatar
      'buffer' must be non-NULL as isc_buffer_allocate can no longer fail. · a038f77d
      Mark Andrews authored
      1636 cleanup:
      
      CID 1458130 (#1 of 1): Dereference before null check (REVERSE_INULL)
      check_after_deref: Null-checking buffer suggests that it may be
      null, but it has already been dereferenced on all paths leading to
      the check.
      
      1637        if (buffer != NULL)
      1638                isc_buffer_free(&buffer);
      a038f77d
    • Ondřej Surý's avatar
      Merge branch 'ondrej/lgtm-narrow-vs-wider-type-comparison-in-a-loop' into 'master' · d162bbcc
      Ondřej Surý authored
      Fix comparison between type uint16_t and  wider type size_t in a loop
      
      See merge request !2986
      d162bbcc
    • Ondřej Surý's avatar
      Fix comparison between type uint16_t and wider type size_t in a loop · a9bd6f6e
      Ondřej Surý authored
      Found by LGTM.com (see below for description), and while it should not
      happen as EDNS OPT RDLEN is uint16_t, the fix is easy.  A little bit
      of cleanup is included too.
      
      > In a loop condition, comparison of a value of a narrow type with a value
      > of a wide type may result in unexpected behavior if the wider value is
      > sufficiently large (or small). This is because the narrower value may
      > overflow. This can lead to an infinite loop.
      a9bd6f6e
  2. 04 Feb, 2020 27 commits
  3. 03 Feb, 2020 4 commits