1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Remove three uses of bitwise ops on boolean values.

If values are boolean, it's confusing to use & and | in place of &&
and ||. In two of these three cases it was simply a typo and I've used
the other one; in the third, it was a deliberate avoidance of short-
circuit evaluation (and commented as such), but having seen how easy
it is to make the same typo by accident, I've decided it's clearer to
just move the LHS and RHS evaluations outside the expression.
This commit is contained in:
Simon Tatham
2018-10-30 18:09:12 +00:00
parent 3a2afbc9c0
commit 5cb56389bd
3 changed files with 7 additions and 7 deletions

View File

@ -407,7 +407,7 @@ static const char *gtk_askpass_setup(struct askpass_ctx *ctx,
ctx->cols[2].red = ctx->cols[2].green = ctx->cols[2].blue = 0x8000;
gdk_colormap_alloc_colors(ctx->colmap, ctx->cols, 2,
FALSE, TRUE, success);
if (!success[0] | !success[1])
if (!success[0] || !success[1])
return "unable to allocate colours";
}
#endif