zNS - Avoid no-ops
Code paths that are causing transactions to be ended with an ineffective outcome or no-operation (no actual state changes) are not advisable, as they consume more gas, hide misconfiguration or error cases (e.g. adding the same controller multiple times), and may impact other processes that rely upon transaction's logs.\\nReject adding an already existing controller, and removing non existing controller.\\n```\\n/\\*\\*\\n @notice Authorizes a controller to control the registrar\\n @param controller The address of the controller\\n \\*/\\nfunction addController(address controller) external override onlyOwner {\\n  controllers[controller] = true;\\n  emit ControllerAdded(controller);\\n}\\n\\n/\\*\\*\\n @notice Unauthorizes a controller to control the registrar\\n @param controller The address of the controller\\n \\*/\\nfunction removeController(address controller) external override onlyOwner {\\n  controllers[controller] = false;\\n  emit ControllerRemoved(controller);\\n}\\n```\\n
Consider reverting code paths that end up in ineffective outcomes (i.e. no-operation) as early as possible.
```\\n/\\*\\*\\n @notice Authorizes a controller to control the registrar\\n @param controller The address of the controller\\n \\*/\\nfunction addController(address controller) external override onlyOwner {\\n  controllers[controller] = true;\\n  emit ControllerAdded(controller);\\n}\\n\\n/\\*\\*\\n @notice Unauthorizes a controller to control the registrar\\n @param controller The address of the controller\\n \\*/\\nfunction removeController(address controller) external override onlyOwner {\\n  controllers[controller] = false;\\n  emit ControllerRemoved(controller);\\n}\\n```\\n