Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
jami-project
jami-project
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 172
    • Issues 172
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Requirements
    • Requirements
    • List
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • savoirfairelinux
  • jami-projectjami-project
  • Issues
  • #137

Closed
Open
Opened May 10, 2016 by RingBot@RingBotOwner

daemon: dangerous operator bool()

Issue generated from Tuleap's migration script. Originally submitted by: Guillaume Roguez (guillaume)

operator bool() SHALL always be marked as "explicit" to prevent unattended behavior, like calling == operators. In such case, lhs and rhs are casted as bool (implicit cast) before the ==, almost resulting on a unattended behavior. As an boggus behavior, see UPnPContext::removeMapping() doing a if (mapping == \*global\_mapping) at line 431.

arguments type inherits of Mapping class.

This one doesn't explicit its overloaded bool operator causing the previous if to always be true (as both arguments are valid).

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: savoirfairelinux/ring-project#137