a == X || Y
is valid C, but does interesting things and probably not what you would
expect. Luckily, clang warns for this kind of problem:
warning: use of logical '||' with constant operand [-Wconstant-logical-operand]
Fix this by using the proper comparison logic, which is
a == X || a == Y
Signed-off-by: Clemens Lang <neverpanic@gmail.com>
%newobject Job;
Job *Job() {
Id extraflags = solver_solutionelement_extrajobflags($self->solv, $self->problemid, $self->solutionid);
- if ($self->type == SOLVER_SOLUTION_JOB || SOLVER_SOLUTION_POOLJOB)
+ if ($self->type == SOLVER_SOLUTION_JOB || $self->type == SOLVER_SOLUTION_POOLJOB)
return new_Job($self->solv->pool, SOLVER_NOOP, 0);
if ($self->type == SOLVER_SOLUTION_INFARCH || $self->type == SOLVER_SOLUTION_DISTUPGRADE || $self->type == SOLVER_SOLUTION_BEST)
return new_Job($self->solv->pool, SOLVER_INSTALL|SOLVER_SOLVABLE|SOLVER_NOTBYUSER|extraflags, $self->p);