Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #2797

Closed (moved)
(moved)
Open
Created Mar 25, 2011 by Nick Mathewson@nickm🍬

Fix redundant checks around routerset_contains_XYZ()

The routerset_contains_foo() functions currently accept "NULL" in place of a routerset argument, with "NULL" denoting an empty routerset. (IOW, routerset_contains_node(NULL, node) always returns false.)

But our code acts like we don't know this: in lots of places, we say stuff like

  if (set && routerset_contains_node(set, node)) {
  }

which is redundant and silly. We can remove the "set &&" with no ill effect.

Note that this shouldn't be confused with

  if (!set || routerset_contains_node(set, node)) {
  }

which is how we say, "in this case, NULL means 'all nodes are included.'"

I'm tagging this as a ticket for 0.2.3.x. We should only do this once 0.2.2 has settled down a little more though, since the merges are likely to be conflicty given the router->node transition.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking