Skip to content

Conversation

@jnpkrn
Copy link

@jnpkrn jnpkrn commented May 11, 2016

No description provided.

jnpkrn added 3 commits May 11, 2016 20:20
...instead of accidentally stealing variables from the outter, lexical
scope, which only worked thanks to match on identifiers, and would get
ultimately broken on renaming them in respective lexical scopes.
Note that such a case seems impossible but there may be other issues
that will add up (see, e.g., reckless snprintf use pointed out with
ClusterLabs/pacemaker#810, something should
eventually be reflected here as well).

Discovered-by: static analysis/Coverity
Otherwise, condition in booth_tcp_init (src/transport.c):

	if (get_local_id() < 0)
		return -1;

could never be triggered.  It should not be triggered anyway at the
current state, but try to stay sane no matter what, especially if
the issue was hidden in such a nasty way.  Also note that using "int"
should be pretty much fine as precautions are taken in add_site
so as to keep MSB unset for site IDs in use, which is sufficient
to distinguish them from a signalling negative value.

Discovered-by: static analysis/Coverity
@dmuhamedagic dmuhamedagic merged commit c49d83c into ClusterLabs:master May 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants